unset the codec for c string conversion. The system one is used instead

preferencesAboutTextFull
unknown 14 years ago
parent 2025c86a57
commit 59ff00754b
  1. 14
      src/core/main.cpp

@ -73,10 +73,16 @@ int main(int argc, char *argv[])
#endif #endif
UBApplication app("Sankore 3.1", argc, argv); UBApplication app("Sankore 3.1", argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); //BUGFIX:
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); //when importing a sankore file that contains a non standard character
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); //the codecForLocale or the codecForCString is used to convert the file path
//into a const char*. This is why in french windows setup the codec name shouldn't be
//set to UTF-8. For example, setting UTF-8, will convert "Haïti" into "HaÂ-ti.
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
//QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
QStringList args = app.arguments(); QStringList args = app.arguments();

Loading…
Cancel
Save