[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search

CLDR Ticket #11014(new tools)

Opened 4 weeks ago

SupplementalDataInfo formats numbers using the default locale

Reported by: roubert Owned by: anybody
Component: util Data Locale:
Phase: dsub Review:
Weeks: Data Xpath:


SupplementalDataInfo.SampleList is supposed to output floating point numbers in a standardized format using a full stop as the decimal separator, this is the format that the rest of CLDR/ICU parses.

But it currently implicitly calls FixedDecimal.toString() which uses the default locale (in my own case set by the value of the LC_CTYPE environment variable) to select the decimal separator and this is not always the full stop.

Because of this, building ICU data from CLDR fails in every environment where the default locale doesn't use the full stop as the decimal separator.

     [java] Caused by: java.lang.IllegalArgumentException: Exception while processing path: //supplementalData/plurals[@type="cardinal"]/pluralRules[@locales="bm bo dz id ig ii in ja jbo jv jw kde kea km ko lkt lo ms my nqo root sah ses sg th to vi wo yo yue zh"]/pluralRule[@count="other"],     value:  @integer 0~15, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0~1.5, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, …

     [java] Caused by: java.lang.NumberFormatException: For input string: "0,0"

One possible solution would be to explicitly format using Locale.ROOT as in the attached patch.

Another possibility could be to claim that the output of FixedDecimal.toString() ought to be independent of locale settings and always use the full stop, and file a bug against ICU4J to get that changed.



cldr-ticket-11014-patch-1.diff (901 bytes) - added by roubert 4 weeks ago.

Change History

Changed 4 weeks ago by roubert


Add a comment

Modify Ticket

as new

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.