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

Parsing floats fails when using locales with a decimal separator different than . #3512

Closed
eregon opened this issue Mar 28, 2024 · 0 comments
Assignees
Labels

Comments

@eregon
Copy link
Member

eregon commented Mar 28, 2024

We had a report that truffleruby does not work with LANG=cs_CZ.UTF-8 (which uses , instead of . as the decimal separator):

$ LANG=en_US.UTF-8 ruby -e 'p 3.4'
3.4
$ LANG=cs_CZ.UTF-8 ruby -e 'p 3.4'
truffleruby: -e:1: could not parse the float '3.4' (SyntaxError)
$ LANG=fr_FR.UTF-8 ruby -e 'p 3.4'
truffleruby: -e:1: could not parse the float '3.4' (SyntaxError)

This is related to how TruffleRuby sets the locale and how Prism depends on it for strtod: ruby/prism#2638

@eregon eregon added the bug label Mar 28, 2024
@eregon eregon self-assigned this Mar 28, 2024
@eregon eregon added this to the 24.1.0 Release (Sep 17, 2024) milestone Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant