We're updating the issue view to help you get more done. 

toLowerCase() in Turkish locale converts to non-ascii lowercase character

Description

For me I think that there should be an option to enable/disable global quoting of the alias generated name. This is a belt-and-braces fix that might get users our of trouble so regardless of how ugly quoting is it can be used to get out of a stick situation.

By default hibernate should just workout the box, so possible solutions:

  • Ensure to quote the alias if the column it is based on is also quoted (automatic quoting of aliases)

  • Understand when the resulting alias needs to be quoted, and quote is when necessary.

  • Ensure to omit any non-ASCII characters in resulting alias, simply skip that character from being used.

  • Use a completely random alias name that confirms to cross-database accepted identifier tokens.

Possible useful reference to the problem:

http://lotusnotus.com/lotusnotus_en.nsf/dx/dotless-i-tolowercase-and-touppercase-functions-use-responsibly.htm

This blog entry also indicates the fix might be as simple as toLowerCase(Locale.ENGLISH) to force use of ASCII ? Then if this works consider auditing the entire codebase for other toLowerCase usage

This problem has not hit me directly but I have been looking at quoting support with HBM and PostgreSQL. This database converts all unquoted identifiers to lowercase, so anything with an uppercase character needs to be quoted to preserve the case.

Environment

Turkish-Locale tr_TR

Status

Assignee

Brett Meyer

Reporter

Darryl Miles

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.2.4

Priority

Major