QTextCodec * codec = QTextCodec::codecForName("UTF-8"); QTextCodec :: setCodecForLocale(codec); QTextCodec :: setCodecForCStrings(codec);