Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103279

Json document localization problem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.2.3
    • Other
    • None
    • Windows

    Description

      I've stumbled upon a problem. Localization selected in the OS influences the format of the floating point saved in the json file.

      For example:
      Take json object which holds several double-digit numbers, save it in QJsonDocument::toJson().
      If you select USA, Swiss or any other the digit is OK: 5.25 (split symbol is a ".").
      If you select Germany the digit is not OK: 5,25 (split symbol is a ",").

      When you try to read this json file as QJsonDocument::fromJson() you can't do that. This function failed to load this file, because it can't load "," properly as part of the digit.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            valera Valera Mikhaylovsky
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes