PDA

View Full Version : QSettings unicode problem



mgiza
15th October 2009, 14:25
Hello,

I want to read settings from an INI file, which is in UTF16-LE format. After reading the docs I thought it is possible by something like this:



QSettings settings("test.ini", QSettings::IniFormat);
settings.setIniCodec("UTF-16LE");
settings.value("animal/snake", 1024).toString();


But when I try to read values, it looks like he is still reading ascii format. Does anyone know what I'm doing wrong or what I'm missing?

pao
5th October 2010, 14:01
I have the same problem.
Anyone can help us?

danielweberdlc
3rd September 2011, 00:01
I've noticed this problem, as well, on 4.7.3 SDK. Setting the codec to UTF-16LE results in no values being read properly from the file at all.

I saved my file as UTF-8 and it started working, reading in my Cyrillic strings properly, however it misread the opening brace of the first section. Putting a blank line in the file above the first section fixed that problem.

UTF-16 appears to be totally broken, though.