PDA

View Full Version : Turkish Locale Bug



isoft
17 Apr 2009, 9:32 AM
Hi,

I searched for this bug, but could not find it, so I am reporting this. I hope it is not a duplicate.

com.extjs.gxt.ui.client.widget.Component.java
Line 1465:



protected void onHide() {
if (hideParent) {
el().getParent().addStyleName("x-hide-" + hideMode.name().toLowerCase());
} else {
el().addStyleName("x-hide-" + hideMode.name().toLowerCase());
}
hideToolTip();
FocusFrame.get().hide(this);
}



As you see it uses toLowerCase() method of the String without any Locale argument. So it tries to use the default Locale. And when your locale is Turkish, the generated lowercase version is not the same as the actual CSS one.

i.e:
expected: DISPLAY : display
when Turkish: DISPLAY : dısplay (notice the dotless i)

How to fix:

Code must not depend on the locale sensitive functions for such non-locale related operations.

Workaround:
The current workaround I have found is to add the below parameters when starting hosted mode:

-Duser.language=en -Duser.country=US

Thank you...

Edit: Version Info:

GWT 1.6.4
GXT 2.0 M1
JDK 1.6.0 u11

uozturk
18 Jun 2009, 8:30 AM
thanks; that was helpful.