[Interest] QSettings keys
Kai Koehne
Kai.Koehne at qt.io
Wed Aug 22 12:07:30 CEST 2018
> -----Original Message-----
> From: Interest <interest-bounces+kai.koehne=qt.io at qt-project.org> On Behalf
> Of Bertwim
> Sent: Wednesday, August 22, 2018 10:42 AM
> To: interest at qt-project.org
> Subject: [Interest] QSettings keys
>
> Hi,
>
> I have a problem with understanding QSettings. I see that when the settings
> are written back to file (ini-file, Linux) certain characters such as <space>, ':'
> (colon), etc, written in their hexadecimal encoding
> (%20 for space, %3A for ':').
> When keys are read (from an ini file) these characters are read as expected, but
> writing them back gives this encoding.
> Why is this, and -more importantly- Is there any way to prevent this, at least
> have the normal printable ascii characters written back to file
This is documented behavior, see https://doc.qt.io/qt-5/qsettings.html#Format-enum
Have you tried calling e.g.
settings.setIniCodec("utf-8")
?
Regards
Kai
More information about the Interest
mailing list