New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Erroneous codegen when default locale is Turkish [sf#114] #115

Closed
lsf37 opened this Issue Feb 15, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@lsf37
Member

lsf37 commented Feb 15, 2015

*Reported by anonymous on 2011-02-03 11:10 UTC
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.

@lsf37 lsf37 changed the title from Erroneous codegen when default locale is Turkish to [Bug] Erroneous codegen when default locale is Turkish [sf#114] Feb 15, 2015

@lsf37 lsf37 added this to the jflex bug milestone Feb 15, 2015

@lsf37 lsf37 closed this Feb 15, 2015

@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

Commented by steve_rowe on 2013-12-22 01:17 UTC
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.

Member

lsf37 commented Feb 15, 2015

Commented by steve_rowe on 2013-12-22 01:17 UTC
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.

@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

Updated by lsf37 on 2014-01-16 06:47 UTC

  • status: open --> open-fixed
Member

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2014-01-16 06:47 UTC

  • status: open --> open-fixed
@lsf37

This comment has been minimized.

Show comment
Hide comment
@lsf37

lsf37 Feb 15, 2015

Member

Updated by lsf37 on 2014-03-01 00:25 UTC

  • status: open-fixed --> closed
Member

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2014-03-01 00:25 UTC

  • status: open-fixed --> closed

@lsf37 lsf37 added bug and removed bug labels Feb 17, 2015

@lsf37 lsf37 modified the milestone: jflex bug Feb 17, 2015

@regisd regisd added this to the 1.5.0 milestone Nov 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment