Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325060 - RAP fails with Turkish Locale...
Summary: RAP fails with Turkish Locale...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 1.4 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-12 16:40 EDT by Hasan Ceylan CLA
Modified: 2010-10-08 09:24 EDT (History)
2 users (show)

See Also:


Attachments
Patch for turkish locale (2.17 KB, patch)
2010-09-27 09:28 EDT, Artur Kronenberg CLA
no flags Details | Diff
Test case (1.40 KB, patch)
2010-09-27 13:38 EDT, Rüdiger Herrmann CLA
no flags Details | Diff
Test cases and patch (5.04 KB, patch)
2010-09-28 07:07 EDT, Artur Kronenberg CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hasan Ceylan CLA 2010-09-12 16:40:17 EDT
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
Comment 1 Ralf Sternberg CLA 2010-09-13 04:25:10 EDT
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" ) );
Comment 2 Artur Kronenberg CLA 2010-09-27 09:28:33 EDT
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.
Comment 3 Rüdiger Herrmann CLA 2010-09-27 13:38:34 EDT
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.
Comment 4 Artur Kronenberg CLA 2010-09-28 07:07:56 EDT
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.
Comment 5 Hasan Ceylan CLA 2010-09-28 07:24:45 EDT
glad that it helped...
Comment 6 Ivan Furnadjiev CLA 2010-10-07 04:37:14 EDT
Applied last patch to CVS HEAD.
Comment 7 Ralf Sternberg CLA 2010-10-07 12:29:03 EDT
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.
Comment 8 Ivan Furnadjiev CLA 2010-10-08 09:24:03 EDT
Also fixed:
QxColor
ThemeAdapterUtil
ThemeManager
PropertyResolver
FontDialog