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

QSettings can't parse UTF-8 ini files

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.0
    • None
    • Fedora 23

    Description

      When I try to parse an UTF-8 ini file, Unicode key's are not recognized.

      Sample:
      QSettings* config;
      config=new QSettings("foo.ini",QSettings::IniFormat,this);
      config->setIniCodec("UTF-8");
      qCInfo(foo)<<config->allKeys();
      qCInfo(foo)<<config->contains(QString("foo/Schlüssel"));

      Output:
      foo.foo: ("foo/Schlüssel")
      foo.foo: false

      Ini file:
      [foo]
      Schlüssel=ccccc

      output of file foo.ini
      foo.ini: UTF-8 Unicode text

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            tuxmaster Frank Büttner
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes