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

Json encoder is generates not valid json, Locale problem #26

Closed
blacksailer opened this issue Feb 2, 2018 · 3 comments
Closed

Json encoder is generates not valid json, Locale problem #26

blacksailer opened this issue Feb 2, 2018 · 3 comments

Comments

@blacksailer
Copy link

blacksailer commented Feb 2, 2018

Hello! Tricky bug.
libtdjson generates not valid jsons. For example if Russian locale is set, float numbers generates with comma not with point. Float numbers with comma is not valid for json parsers. It can be seen in ttl_expires_in field of updateNewMessage object.
Lib must be locale invariant.
Checked on Sailfish OS.

@levlam
Copy link
Contributor

levlam commented Feb 2, 2018

Thanks for the report. We was aware of locale dependent float to string and string to float conversions, but haven't noticed that they break our JSON interface, which makes the bug critical.

@levlam
Copy link
Contributor

levlam commented Feb 3, 2018

Should be fixed in 9d5580f. Thanks!

@levlam levlam closed this as completed Feb 3, 2018
@blacksailer
Copy link
Author

Fixed, It works. Thanks to you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants