Skip to content
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
Closed

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

lsf37 opened this issue Feb 15, 2015 · 3 comments
Labels
bug Not working as intended
Milestone

Comments

@lsf37
Copy link
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 Erroneous codegen when default locale is Turkish [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 as completed Feb 15, 2015
@lsf37
Copy link
Member Author

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
Copy link
Member Author

lsf37 commented Feb 15, 2015

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

  • status: open --> open-fixed

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

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

  • status: open-fixed --> closed

@lsf37 lsf37 added bug Not working as intended and removed bug Not working as intended 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
Labels
bug Not working as intended
Projects
None yet
Development

No branches or pull requests

2 participants