diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-04-30 10:37:55 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-30 10:39:28 -0700 |
commit | 7797926329b66af85e4565af8109111b58869eb3 (patch) | |
tree | 22345629d5352a4a1bc3b17bee451a2caac54be6 /qt-gui.cpp | |
parent | 084c2c04db07f8e0dab171016e59148b704594b9 (diff) | |
download | subsurface-7797926329b66af85e4565af8109111b58869eb3.tar.gz |
Tell Qt4 that we really meant Utf8 when we said Utf8
How strange. Telling Qt4 to assume that all C strings are Utf8 apparently
isn't enough to convince tr() that the C strings we pass to it are Utf8.
You need to set that codec separately.
Fixes #503
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-gui.cpp')
-rw-r--r-- | qt-gui.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-gui.cpp b/qt-gui.cpp index dc3fb4004..f2b655e14 100644 --- a/qt-gui.cpp +++ b/qt-gui.cpp @@ -89,6 +89,9 @@ void init_ui(void) // 106 is "UTF-8", this is faster than lookup by name // [http://www.iana.org/assignments/character-sets/character-sets.xml] QTextCodec::setCodecForCStrings(QTextCodec::codecForMib(106)); + // and for reasons I can't understand, I need to do the same again for tr + // even though that clearly uses C strings as well... + QTextCodec::setCodecForTr(QTextCodec::codecForMib(106)); #ifdef Q_OS_WIN QFile::setDecodingFunction(decodeUtf8); QFile::setEncodingFunction(encodeUtf8); |