#114 Erroneous codegen when default locale is Turkish

jflex bug

In my machine, codes generated by JFlex contain "İ"s (dotted capital i, a strange Turkish letter) instead of "I"s (regular capital i) in variable names. Naturally, none of the generated codes compile.

This is probably because my default locale is Turkish and in Turkish alphabet the upper case version of "i" is "İ". If that's the case, using Locale.ENGLISH explicitly for case conversions should solve the problem.


  • Steve Rowe

    Steve Rowe - 2013-12-22

    I was able to reproduce on an en_US default locale machine via:

    java -Duser.country=TR -Duser.language=tr -jar jflex-1.5.0-SNAPSHOT.jar grammar.flex

    As the bug reporter noted, the issue was locale-dependent case conversions.

    I committed a fix in r724, where I hunted down all String.to{Upper,Lower}Case() calls that didn't supply a locale and added Locale.ENGLISH as a param.

  • Gerwin Klein

    Gerwin Klein - 2014-01-16
    • status: open --> open-fixed
  • Gerwin Klein

    Gerwin Klein - 2014-03-01
    • status: open-fixed --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks