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

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

@ -74,9 +74,15 @@ int main(int argc, char *argv[])
UBApplication app("Sankore 3.1", argc, argv);
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
//BUGFIX:
//when importing a sankore file that contains a non standard character
//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();

Loading…
Cancel
Save