Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.2
-
None
-
-
8
-
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
- relates to
-
QTBUG-133804 Qt 5 and Qt 6 both use QtProject.conf, but in an incompatible way
-
- Open
-
- resulted in
-
QTBUG-101380 QSettings: write keys in INI files using UTF-8
-
- Reported
-
For Gerrit Dashboard: QTBUG-99401 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
397865,4 | QSettings: support reading UTF-8 keys in INI files | dev | qt/qtbase | Status: MERGED | +2 | 0 |