Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
6.5.0
-
None
Description
In qt5, using QTextCodec:: setCodecForLocale can affect the encoding of QByteArray QString:: toLocal8Bit. This allows for direct encoding conversion in GBK or UFT8.
However, in qt6, using QTextCodec:: setCodecForLocale cannot affect the encoding of QByteArray QString:: toLocal8Bit. Resulting in encoding conversion not being possible.
If I use the QTextCodec:: setCodecForLocale function and switch the local encoding to gbk or shift jit encoding, QString:: toLocal8Bit does not switch to the specified encoding, but still uses the operating system's own encoding. This is clearly a bug. Or rather, it is not compatible with QT5.
Previously, I provided a bug to your company stating that QStringEncoder cannot convert codes such as gbk and utf8 to each other. You replied that using the ICU package, which is compatible with QT5, can solve the problem.
The encoding conversion of QT6 is a huge setback compared to QT5.QT6 is already the fifth version, but there are still many compatibility issues in terms of details. Confidence in developers is a big blow.
At present, is there any function or function that can switch back and forth between various encodings such as GBK, shift jit, and so on, just like QT5?