Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1389

[PATCH] Fix in AWT preview if used with non-english locale

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • renderer/awt
    • None
    • Operating System: Mac OS X 10.4
      Platform: Macintosh
    • 42832

    Description

      The description here is longer than the patch

      The AWT preview window uses DecimalFormat
      to format the current zoom level, which (correctly) on a German locale results in comma
      being used instead of dot as a decimal separator.

      However, when re-reading it using Double.parseDouble
      is requires a dot, because parseDouble is not locale aware, resulting in a NumberFormatException
      being thrown.

      Possible fixes:

      • Use a different number parser (non-trivial)
      • Ensure
        that the number is always formated with a dot as decimal separator (as done in the attached
        patch)

      Attachments

        1. awtpreviewlocale.patch
          0.9 kB
          Max Berger

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            max@berger.name Max Berger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: