"codecForName " use this function i can't get anything for GB2312
-
@JKSH
Sorry ,I am not understand anything about ICU .what't ICU short for ? Is it a plugin that need install?
where can i download ICU ? I did't serch anything about ICU in QT website.
In linux terminal ,use" locale -e " ,we can got Gb2312
Thank you for your reply. -
ICU stands for "International Components for Unicode". It is an external library. Qt 5 gets codecs from iCU.
Search your Linux package manager for "ICU".
Can you also tell us:
- What version of Linux do you have?
- How did you install Qt?
-
@jihong said:
I Install ICU already ,but I got the same problem .
linux version is 2.6.32-358.el6.x84-64
I compile QT source and change environment variable
I use the QT version 4.5.3 ..Sorry, I thought you were using Qt 5. Qt 4 does not support GB2312. It only supports the codecs listed at http://doc.qt.io/qt-4.8/qtextcodec.html#details
Can you use GB18030 instead?
If you want to support GB2312, I think you need to build Qt 5.5.1. Make sure ICU is enabled when you build Qt 5.
-
@JKSH
I Can't get GB18030 for " availableCodecs " in custorm't cmputer,
" QTextcode::availableCodecs " this function got totally 117 。
normally GB18030 is in 118 in our computers.and we got 142 for QTextcode::availableCodecs in our computer .
Both the computer has the same systerm