Make Qt treat all C strings from Warzone as UTF-8 by default. Closes ticket:2657

master
Per Inge Mathisen 2011-04-24 11:34:11 +02:00
parent 657bb2d31b
commit b3be4b17d4
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@
// Get platform defines before checking for them! // Get platform defines before checking for them!
#include "lib/framework/frame.h" #include "lib/framework/frame.h"
#include <QtCore/QTextCodec>
#if defined(WZ_OS_WIN) #if defined(WZ_OS_WIN)
# include <shlobj.h> /* For SHGetFolderPath */ # include <shlobj.h> /* For SHGetFolderPath */
@ -1083,6 +1084,7 @@ int main(int argc, char *argv[])
{ {
return -1; return -1;
} }
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); // make Qt treat all C strings in Warzone as UTF-8
setupExceptionHandler(utfargc, utfargv); setupExceptionHandler(utfargc, utfargv);