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

CLDR Ticket #11014(closed: fixed)

Opened 11 months ago

Last modified 3 months ago

SupplementalDataInfo formats numbers using the default locale

Reported by: roubert Owned by: mark
Component: infrastructure Data Locale:
Phase: dsub Review: roubert
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 11 months ago.

Change History

Changed 11 months ago by roubert

comment:1 Changed 10 months ago by mark

  • Keywords google added

comment:2 Changed 8 months ago by mark

  • Owner changed from anybody to mark
  • Phase changed from dsub to dvet
  • Priority changed from assess to major
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 34

comment:3 Changed 6 months ago by mark

  • Phase changed from dvet to dsub
  • Milestone changed from 34 to 35

comment:4 Changed 4 months ago by mark

  • Component changed from util to infrastructure

comment:5 Changed 3 months ago by mark

  • Status changed from accepted to reviewing
  • Review set to roubert

comment:6 Changed 3 months ago by roubert

  • Status changed from reviewing to closed
  • Resolution set to fixed

Add a comment

Modify Ticket

as closed
Next status will be 'new'
Next status will be 'closed'

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

Note: See TracTickets for help on using tickets.