When we generate entity classes using NetBeans wizards on a system with Turkish locale, generated sources have many
wrong characters while converted to lower case (ex. personıd, jobtıtle, ...), because of lower case ı character in
Turkish is the same as upper case I (i) in English. I think source code generation components must convert these cases
in English locale, as Java source code syntax rules are designed in English alphabet. The same problem can be seen in
RESTful Web Services code generation for JAX-RS API.
This may be intentional -- in case when identifiers or column names are in Turkish language...
Waiting for opinion from NB developers...
do you mean you expect names like (personId, jobtItle etc)?
first one seems reasonable, but second one looks strange, what are names of tables/columns, are names in english/ascii?
do you mean all places with i and I are replaced with ı? if tables/database etc have non-ascii chanracters in names, can
you attach schema?
I expect getting column names like personid, jobtitle, ... I agree that it may be intentional to do like I stated, but
then there should be an option to select a Locale which will be used in case conversation operations, because many times
you don't design table column names in the same language your platform operates.
ok, what's about real column names?
what is your os/locale/system encoding?
is there any problem with how it works?
have you filed an issue for "RESTful Web Services code generation for JAX-RS API"?
Real column names are designed in upper case like PERSONID and JOBTITLE, but they are case-independent in sql, query
engines operate in English locale, I think, so we can access columns with "personid". When we generate entity classes
with these column names, I think there can be a Locale selection box in the wizard, so if the developer wants to
preserve platform locale he/she can select, but if he/she want to select a specific locale, English in my case, he/she
I didn't file an issue about JAX-RS API, which I couldn't decide which component it's about.
one more question what does it mean "lower case ı character in
Turkish is the same as upper case I (i) in English", what is the same?
In Turkish, upper case of i character is İ, but in English it is I; also little ı (which is not in English alphabet)
character's upper case is I. So it's a problem when we name a column JOBID and it is converted to lower characters not
jobid, but jobıd.
Created attachment 97944 [details]
screenshot of missing tabs immediately after fresh install
usage of toLowerCase(Locale.ENGLISH) may help, at least to convert JOBTITLE properly, but I'm not sure how it will handle case with local characters usage in names.
3 years for the issue. main problem it's hard to test fix with different locales, for future release I can consider an option for generation to be able to choose conversion type localized vs english based. this change will be backward compatible.
ok, decide to folдow initial suggestion about English locale.
even if some db allow Turkish and other non default locales for table names it looks to be less common case(I can't verify if it have sense) and it's better to get proper behaviour in more general use-case with Latin names.
Integrated into 'main-silver', will be available in build *201401290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Sergey B. Petrov <email@example.com>
Log: #157943 decide to implement initial suggestion for English local usage