Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-407

toLowerCase without Locale.English causing trouble in some language regions (Turkey especially)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Jena 2.10.0
    • Jena 2.10.1
    • Jena
    • None

    Description

      The instance I am referring to concretely is the language tag constructor: LanguageTag.

      It makes the following call on line 41: String lc = tag.toLowerCase(); This should be corrected to String lc = tag.toLowerCase(Locale.English);

      The problem is that otherwise, it use the machine default language to produce the lower cases which in some Locales (Turkey being one of them) incorrectly lowercases letters like 'I'. Because the tag is a 'technical' term (not an actual piece of language) it should lowercase in English

      The effect of this particular instance is that we see

      System.err.println("Internal Error in static initializer of IanaLnaguageTag.")

      appear in std.err and it has raised concerns with our customers.

      In general, any occurrence of toLowerCase should be adjusted if it lowercases a technical term.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andy Andy Seaborne
            shelsen Simon Helsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment