QsTr() and non-ASCII characters
-
Has anyone successfully used qsTr() with a source string containing non-ASCII Latin-1 characters? I just cannot make it work.
Especially not with Qt 4.8.2. Using 4.7.4 it seems to work on the target Windows CE device, but not on Windows. Using 4.8.2, there seems to be an additional conversion to UTF-8, which makes the string get an extra Â. This means no translation is found, because the translation file does not contain the extra Â, and the string returned by qsTr() is the string with the extra Â. -
Hi,
There was a known issue with this in 4.7, but it should be working in 4.8 (see https://bugreports.qt-project.org/browse/QTBUG-14989 for details). I'd suggest opening a new bug if this isn't working correctly in 4.8.2.
Regards,
Michael -
QML file is UTF-8, C++ files are Latin-1.
Filed a bug report for this as "QTBUG-26193":https://bugreports.qt-project.org/browse/QTBUG-26193.