PDA

View Full Version : Read utf-8(?) signs from file



Grzyboo
6th September 2015, 21:43
I have a .txt file with some polish letters:
żźćóę etc.

I want to read the file contents, but it doesn't read these non-ASCII characters.

QTextStream::setCodec("UTF-8") doesn't seem to work.

ChrisW67
6th September 2015, 22:23
I guess the file is not UTF8 encoded. Probably Windows code page 1250 or ISO-8859-2 (-13 or -16) You would need to check what the source was encoding with, or check the actual bytes in the file to work out which.