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

QSettings: support reading UTF-8 keys from INI files

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/X11, macOS
    • Story Points:
      8
    • Sprint:
      Team One Foundation Sprint 52, Team A Foundation Sprint 53

      Description

      Ini files with unicode characters like German umlauts are not read correctly and saving stores in ASCII. SetIniCodec() was removed and according the documentation it should be UTF8 by default now. Same problem exists on macOS.

      #include <QCoreApplication>
       #include <QSettings>
      int main(int argc, char *argv[])
      { QCoreApplication a(argc, argv); QSettings settings("test.ini", QSettings::IniFormat); settings.beginGroup("Test"); settings.setValue("BAR",""); settings.setValue("BÄR",""); settings.setValue("OST",""); settings.setValue("ÖSE",""); settings.endGroup(); return a.exec(); }

      >file test.ini
      test.ini: ASCII text

      [Test]
      BAR=
      B%C4R=
      OST=
      %D6SE=

      Update: the scope of this task is changed to implement only reading support, because writing is not backward-compatible. QTBUG-101380 is created to track the writing support, which might happen in next major release.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-99401
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              ivan.solovev Ivan Solovev
              Reporter:
              htietze Heiko Tietze
              PM Owner:
              Vladimir Minenko Vladimir Minenko
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes