Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
QTextStream::setCodec() was removed from Qt 6. However,
- There is no direct replacement for this function yet (
QTBUG-120020aims to rectify that). The new QStringConverter::Encoding covers very few encodings compared to QTextCodec. - The removal of this function is not discussed in https://doc.qt.io/qt-6/qtcore-changes-qt6.html
- This function and QTextCodec were not deprecated in Qt 5.15
This is quite a major change but with minimal warning or guidance. https://doc.qt.io/qt-6/qtcore-changes-qt6.html should be updated to point users in the right direction.
Important points
If users need to support encodings that are not covered by QStringConverter::Encoding...
- ...and if
QTBUG-120020is not implemented, then they need guidance on how to restructure their code. - ...and if they're on a platform where the pre-built Qt does not have ICU support enabled (e.g. Windows), they need to to know to build Qt from source to enable ICU support (and ship ICU libraries with their software). This is only briefly alluded to at https://doc.qt.io/qt-6/qstringconverter.html#encodingForName
Attachments
Issue Links
- relates to
-
QTBUG-120020 Provide an overload for QTextStream::setEncoding() that accepts an arbitrary encoding name
- Closed