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

[REG:5.15->6] Shift_JIS support for QDomDocument on Qt6

    XMLWordPrintable

Details

    • 122270d6be (qt/qtbase/dev) 122270d6be (qt/tqtc-qtbase/dev) 980395c764 (qt/qtbase/6.4) 980395c764 (qt/tqtc-qtbase/6.4)
    • Foundation PM Prioritized

    Description

      In Qt6, when an XML document encoded in Shift_JIS is loaded by QDomDocument (setContent()), the following error message is thrown.
      "Encoding shift_jis is unsupported".

      This issue occurs on Qt6. If we use Qt5, the XML document was read correctly without any error.

      Our customers use a lot of code to parse Shift_JIS encoded XML using QDomDocument, so this is a critical issue.

      Is there any way to support Shift_JIS in Qt6's QDomDocument?

       

      [Sample XML file and sample code]

      Sample XML file : shift-jis.xml

          QDomDocument doc("mydocument");
          QFile file("shift_jis.xml");
          file.open(QIODevice::ReadOnly);
      
          QString errorMsg;
          int errorLine = -1;
          int errorColumn = -1;
      
          doc.setContent(&file, &errorMsg, &errorLine, &errorColumn);
          qDebug() << errorMsg;
      
          file.close();
      

      Attachments

        Issue Links

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

          Activity

            People

              fabiankosmale Fabian Kosmale
              sfukuda Shin Fukuda
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes