Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
-
None
-
21
-
Qt6_Foundation_ Sprint 11, Qt6_Foundation_ Sprint 12
-
cd70242b87add27696cffa446cfec684afba68ab (qt/qt5compat/6.0)
Description
QTextCodec provides support for - primarily - legacy text codecs that have very little relevance on modern systems, where strings are either utf-16 or utf-8.
We can remove text codec support from QtCore, and move respective functionality into a separate module. Requiring application developers that need to consume or produce text data in other encodings to explicitly convert the data using that module, is acceptable; QTextCodec provides the necessary functions to convert to and from QString.
Classes that use QTextCodec in the API, or internally, and that would impacted by such a change are at least (incomplete list)
- QTextStream::setCodec
- QSettings::setIniCodec]
- QXmlStreamReader/Writer::setCodec
- QTextDocument::codecForHtml
- QTextDocumentWriter::setCodec
In addition, several classes in Qt use QTextCodec functionality internally in the implementation, and the documentation refers to QTextCodec in a number of places (which as such is not a problem, but might require a review to ensure that we don't recommend usage of legacy functionality).
The individual text codecs already live in plugins, no need to change anything here.
Attachments
Issue Links
- relates to
-
QTBUG-75991 Remove legacy text codecs from qtbase
- Closed