-
Notifications
You must be signed in to change notification settings - Fork 32
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
Errors parsing & writing JSON floats, in some locales #54
Comments
snej
added a commit
that referenced
this issue
Sep 23, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 23, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55)
snej
added a commit
that referenced
this issue
Sep 24, 2019
* Reading/writing floating point was accidentally locale-dependent, which caused errors in locales that don't use '.' as the decimal point. (Fixes #54) * Improved round-trip accuracy of Fleece->JSON->Fleece float/double conversions, by writing the optimal number of decimal places. To do this we brought in a small subcomponent of Swift. (Fixes #55) * Added float-to-string conversion tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code we use for reading/writing floating point is (accidentally) locale-dependent, thanks to some really bad design decisions in the ANSI C and POSIX specs. This means that in locales that don't use "." as the decimal point character, floats won't parse or format properly. (Pointed out by @Dushistov in #51.)
The text was updated successfully, but these errors were encountered: