I have some problems with the localization of Qt programs. Everything is fine on my computer, but when I send my program to other users, they cannot see the characters of some languages. In this case, I tested Thai.
Program output in screenshots: My operating system: Windows 7 Ultimate x64 SP1 http://myprintscreen.com/s/1id
Custom cpu OS is the same: Windows 7 Ultimate x64 SP1 http://myprintscreen.com/s/1ie
The user can print Thai in Microsoft Word and Notepad ++, but not in the Qt input fields.
And we found an interesting error ( http://myprintscreen.com/s/1if ): If you copy Thai text from Microsoft Word to QTextEdit, it displays fine. QLineEdit and QPlainTextEdit do not display correctly.
On Windows XP x86 SP3 ( http://myprintscreen.com/s/1ii ) is not displayed in Japanese, but with Thai everything is fine :)
I am trying to use:
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QString::fromUtf8 tr trUtf8 QTextCodec::codecForName("UTF-8")->toUnicode
Qt project: http://www74.zippyshare.com/v/39453145/file.html
Help me please. I canโt figure out what to do to make it work.
source share