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

QLocale system locale decimal separator incorrect

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.7.1
    • Core: Locales (i18n)
    • None
    • Linux

    Description

          qDebug() << QLocale::system();
          qDebug() << QLocale::system().decimalPoint();
          qDebug() << QLocale(QLocale::German, QLocale::Germany);
          qDebug() << QLocale(QLocale::German, QLocale::Germany).decimalPoint();
          qDebug() << QLocale(QLocale::system().name());
          qDebug() << QLocale(QLocale::system().name()).decimalPoint();
      

      prints

      QLocale(German, Latin, Germany)
      '.'
      QLocale(German, Latin, Germany)
      ','
      QLocale(German, Latin, Germany)
      ','
      

      Comma is the correct decimal separator. This is a regression. It worked before but I am not sure in which version it was introduced (5.7 or earlier). This is the locale:

      LANG=de_DE.utf8
      LC_CTYPE="de_DE.utf8"
      LC_NUMERIC="de_DE.utf8"
      LC_TIME="de_DE.utf8"
      LC_COLLATE="de_DE.utf8"
      LC_MONETARY="de_DE.utf8"
      LC_MESSAGES="de_DE.utf8"
      LC_PAPER="de_DE.utf8"
      LC_NAME="de_DE.utf8"
      LC_ADDRESS="de_DE.utf8"
      LC_TELEPHONE="de_DE.utf8"
      LC_MEASUREMENT="de_DE.utf8"
      LC_IDENTIFICATION="de_DE.utf8"
      LC_ALL=
      

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              manuelschneid3r Manuel Schneider
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes