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

QLocale system locale decimal separator incorrect

XMLWordPrintable

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

          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=
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes