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

CLDR Ticket #10044(accepted tools)

Opened 10 months ago

Last modified 2 months ago

SupplementalDataInfo fails when default locale ≠ en-US

Reported by: Michele Locati <mlocati@…> Owned by: emmons
Component: json Data Locale: 30.0.3
Phase: rc Review:
Weeks: Data Xpath:
Xref:

ticket:9405

Description

I'm trying to build the JSON data with tools/java/cldr.jar.
I'm on Windows with the locale it_IT, where the decimal separator is comma and not dot.

I had to add -Duser.language=en -Duser.country=US when running cldr.jar, otherwise I get an error when running
java -DCLDR_DIR="C:/Path/To/CLDR/30.0.3" -DCLDR_GEN_DIR="C:/Path/To/Output/main/ar" -jar "C:\Path\To\CLDR\30.0.3\tools\java\cldr.jar" ldml2json -o true -t main -r true -m "ar"

Here's the error:

>> org.unicode.cldr.json.Ldml2JsonConverter
commondir	?	C:\Path\To\CLDR\30.0.3\common\
destdir	?	C:\Path\To\Output\main\ar\
match	?	ar
type	?	main
resolved	?	true
draftstatus	?	unconfirmed
coverage	?	optional
fullnumbers	?	false
other	?	true
packages	?	false
identity	?	true
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.unicode.cldr.tool.Main.main(Main.java:61)
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, �
	at org.unicode.cldr.util.SupplementalDataInfo$MyHandler.handlePathValue(SupplementalDataInfo.java:1302)
	at org.unicode.cldr.util.XMLFileReader$MyContentHandler.endElement(XMLFileReader.java:206)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLNSDTDValidator.endNamespaceScope(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.unicode.cldr.util.XMLFileReader.read(XMLFileReader.java:157)
	at org.unicode.cldr.util.XMLFileReader.read(XMLFileReader.java:107)
	at org.unicode.cldr.util.XMLFileReader.read(XMLFileReader.java:92)
	at org.unicode.cldr.util.SupplementalDataInfo.getInstance(SupplementalDataInfo.java:1019)
	at org.unicode.cldr.util.CLDRConfig.getSupplementalDataInfo(CLDRConfig.java:197)
	at org.unicode.cldr.util.SupplementalDataInfo.getInstance(SupplementalDataInfo.java:943)
	at org.unicode.cldr.json.Ldml2JsonConverter.<init>(Ldml2JsonConverter.java:64)
	at org.unicode.cldr.json.Ldml2JsonConverter.main(Ldml2JsonConverter.java:115)
	... 5 more
Caused by: java.lang.NumberFormatException: For input string: "0,0"
	at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
	at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
	at java.lang.Double.parseDouble(Double.java:538)
	at java.lang.Double.valueOf(Double.java:502)
	at org.unicode.cldr.util.SupplementalDataInfo$PluralInfo.<init>(SupplementalDataInfo.java:3323)
	at org.unicode.cldr.util.SupplementalDataInfo$PluralInfo.<init>(SupplementalDataInfo.java:3211)
	at org.unicode.cldr.util.SupplementalDataInfo.addPluralInfo(SupplementalDataInfo.java:2992)
	at org.unicode.cldr.util.SupplementalDataInfo.addPluralPath(SupplementalDataInfo.java:2959)
	at org.unicode.cldr.util.SupplementalDataInfo.access$500(SupplementalDataInfo.java:84)
	at org.unicode.cldr.util.SupplementalDataInfo$MyHandler.handlePathValue(SupplementalDataInfo.java:1245)
	... 25 more

Attachments

Change History

comment:1 Changed 10 months ago by srl

  • Xref set to 9405
Last edited 10 months ago by srl (previous) (diff)

comment:2 Changed 10 months ago by srl

  • Summary changed from Failed to generate JSON when decimal separator is comma to SupplementalDataInfo fails when default locale ≠ en-US

comment:3 Changed 9 months ago by mark

  • Owner changed from anybody to emmons
  • Priority changed from assess to major
  • Status changed from new to accepted
  • Milestone changed from UNSCH to 31

comment:4 Changed 9 months ago by emmons

  • Phase changed from dsub to rc
  • Component changed from unknown to json
  • Milestone changed from 31 to 32

comment:5 Changed 3 months ago by jan.berkel@…

Shouldn't this just be a simple fix with NumberFormat.getInstance(Locale.ENGLISH).parse(...) instead of using locale specific methods such as Double.valueOf ?

comment:6 Changed 2 months ago by emmons

  • Milestone changed from 32 to upcoming
View

Add a comment

Modify Ticket

Action
as accepted
Author


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

 
Note: See TracTickets for help on using tickets.