Uploaded image for project: 'Hibernate ORM'
  1. HHH-8579

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 4.2.4
    • Fix versions: 4.2.7, 4.3.0.CR1
    • Components: None
    • Labels:
      None
    • Environment:
      Turkish-Locale tr_TR
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      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.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: