Generated Java code under Turkish Locale

284 views
Skip to first unread message

csahi...@gmail.com

unread,
Jan 8, 2019, 7:23:36 AM1/8/19
to Xtend Programming Language
Hi.
Under Turkish locale generated java code contains character as " ı " and " İ ". These are Turkish characters. There are generated because " I " converts to lower case char " ı " and " i " converts to upper case " İ " in Turkish. Famous behavier better described at http://www.moserware.com/2008/02/does-your-code-pass-turkey-test.html. In general this not a problem but sometimes Maven will complain about characters. Code generation easily fixed under Eclipse by adding "-Duser.language=en -Duser.country=US" options. I am very sure that problem exists only under Turkish locale. But I think it better be fixed.
I do not know if this behaviour belongs to XText. May be I should write there.

Christian Dietrich

unread,
Jan 8, 2019, 7:26:32 AM1/8/19
to Xtend Programming Language
Hi, is this about eclipse or standalone. in eclipse you ususally set encoding on the workspace or on a project/file level in preferences/properties.
in standalone (maven, gradle) use the means they offer

Jeyhun Mamedov

unread,
Jan 8, 2019, 2:55:11 PM1/8/19
to Xtend Programming Language
I generally work under eclipse. But our product compiled under Tycho/Maven. Same weird code generation. So the problem is more general. Every Turkish Java developer (actually not only java, but I also encountered the same problem with other languages/frameworks like Python and C#) knows this locale problem. It is not even the developers' fault. You may not know that some locale on another side of the globe will disrupt your code. But if you know, all you should do add 2-3 new tests to test suit. We produce software for mostly Turkish audience. And frankly, changing Eclipse locale at least ugly workaround, if not wrong.

8 Ocak 2019 Salı 15:26:32 UTC+3 tarihinde Christian Dietrich yazdı:

Christian Dietrich

unread,
Jan 9, 2019, 1:13:53 AM1/9/19
to Xtend Programming Language
again how does your config in maven look like then?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages