Community
Participate
Working Groups
Build Identifier: "The Turkish I case" and how it affects applications that use toUpper() and toLower() is explained here, http://java.sys-con.com/node/46241 In this incident the problem was in LifeCycleAdapterFactory. In loadWidgetLCA(..) method RAP uses simpleClassName.toLowerCase(). then for 'MenuItem', it becomes 'menuıtem'. Hope you can spot (bugzilla deals properly with Turkish Charset) the Turkish i withOUT the dot in small menuıtem the solution to use toUpper(Locale.EN) and toLower(Locale.EN) to ensure it works in Turkish Environment Regards, Hasan Ceylan Reproducible: Always Steps to Reproduce: 1. user tr_TR locale 2. try any RAP demo
Here's a short version of the problem: http://jukkaz.wordpress.com/2010/04/12/simple-tolowercase-is-simple-right/ Running the RWT test suites with a turkish locale leads to one failure and a lot of errors. Add this to the beginning of the test suite: // Locale.setDefault( new Locale( "fr", "FR" ) ); // french works fine Locale.setDefault( new Locale( "tr", "TR" ) );
Created attachment 179636 [details] Patch for turkish locale All the test cases run with this patch. I also ran the business examples demo and had no problems with the Turkish locale.
Created attachment 179669 [details] Test case This test case uses HtmlResponseWriterUtil#isEmptyEntity() with a turkish locale. It should be possible to write a similar test case for the LifeCycleAdapterFactory case.
Created attachment 179726 [details] Test cases and patch I added a test case to your patch that checks the LifeCycleAdapterFactory case and the patch itself.
glad that it helped...
Applied last patch to CVS HEAD.
We still have some String.toLowerCase()'s in our code which potentially have similar problems. As an example, finding a ThemeAdapter for a widget with uppercase "I" in its name will not work with a Turkish locale. I think we should come up with some more tests and fix this issue entirely.
Also fixed: QxColor ThemeAdapterUtil ThemeManager PropertyResolver FontDialog