1 Reply Latest reply: Nov 22, 2010 11:25 AM by Jörg RSS

    reading Number Format from system settings

    802349
      java determines the user's number format by using a locale, ie the format depends solely on the language and the country.

      the problem: our customers use eg english language, but in addition to that they change the decimalseparator in the regional settings of windows to something different (eg "," when in java a "." would be defined for their country/language).

      the question: is there a way to get the decimalseparator from the user's system settings? best would be a common way, so that the operating system doesn't matternumb

      thanks in advance for the help!
        • 1. Re: reading Number Format from system settings
          Jörg
          is there a way to get the decimalseparator from the user's system settings?
          Could you please specify "user's system settings"? Do you mean settings of the OS (language) or Java (locale)?
          best would be a common way, so that the operating system doesn't matter
          In general, java doesn't care for the operatiing systen, so to say.
          Look at class DecimalFormatSymbols where can retrieve and modify the defaults to your heart's content.