JSON format for Variant encoding uses system locale for doubles

Bug #1360247 reported by Pete Woods
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-scopes-api (Ubuntu)
Fix Released
Low
Michi Henning

Bug Description

e.g. Variant(1.23).serialize_json() is going to give you different results depending on your system locale setting.

This seems highly risky to use in any situation where the result could either be saved to disk (and then the system locale is changed) or if two different machines with different locales were communicating.

Related branches

Revision history for this message
Paweł Stołowski (stolowski) wrote :

This is an issue of the underlying jsoncpp - see http://sourceforge.net/p/jsoncpp/bugs/43/

Changed in unity-scopes-api:
status: New → Confirmed
affects: unity-scopes-api → unity-scopes-api (Ubuntu)
Revision history for this message
Michi Henning (michihenning) wrote :

Setting this to low priority because we are defenseless against this bug.

Changed in unity-scopes-api (Ubuntu):
importance: Undecided → Low
Revision history for this message
Michi Henning (michihenning) wrote :

Apparently, this is fixed in version 0.8.* and 1.4.*. (Currently, the archives provide 0.6.0.

https://github.com/open-source-parsers/jsoncpp/commit/496c6555239e90f995bbb09ad48e17afa8058719

Changed in unity-scopes-api (Ubuntu):
assignee: nobody → Michi Henning (michihenning)
status: Confirmed → In Progress
Revision history for this message
Michi Henning (michihenning) wrote :

I just tried with version 1.6.5-4. Unfortunately, it's still broken. When the locale is set to de_DE.utf8, it serializes correctly now, but it no longer parses "10.5" and, instead, comes back with '10.5' is not a number.' :-(

I've opened a bug here:

https://github.com/open-source-parsers/jsoncpp/issues/439

Changed in unity-scopes-api (Ubuntu):
assignee: Michi Henning (michihenning) → nobody
status: In Progress → Confirmed
Changed in unity-scopes-api (Ubuntu):
assignee: nobody → Michi Henning (michihenning)
status: Confirmed → In Progress
Changed in unity-scopes-api (Ubuntu):
status: In Progress → Fix Committed
Changed in unity-scopes-api (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.