Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75665

Move QTextCodec support out of QtCore

    XMLWordPrintable

Details

    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              heimrich Karsten Heimrich
              vhilshei Volker Hilsheimer
              Maurice Kalinowski Maurice Kalinowski
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes