aspen0883 / xmlwise

Automatically exported from code.google.com/p/xmlwise
0 stars 0 forks source link

Plist RuntimeException on Turkish (DİCT) #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Plist with "dict"-Element
2. Set default Locale to tr_TR (Turkish)

What is the expected output? What do you see instead?
I expect that the XML will be parsed correct. Instead i get a RuntimeException. 
("Unexpected type: DİCT")

What version of the product are you using? On what operating system?
Trunk, Windows and Linux 

Please provide any additional information below.
The problem is causes by toUpperCase() without setting explicit a Locale. Small 
"i" toUpperCase() will be a "İ" in Turkish. See: 
http://www.i18nguy.com/unicode/turkish-i18n.html

Change line 442 in Plist from 
"ElementType type = ElementType.valueOf(element.getName().toUpperCase());"
to 
" ElementType type = 
ElementType.valueOf(element.getName().toUpperCase(Locale.US));
"

Original issue reported on code.google.com by bastian....@googlemail.com on 12 Jun 2014 at 12:13