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

QXmlStreamWriter writes invalid xml in UTF-16

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 4.8.0, 4.8.2, 5.0.0 Beta 1
    • Fix Version/s: 5.0.0 RC 1
    • Labels:
      None
    • Environment:
      windows 7 x64
      visual c++ 2010
    • Commits:
      035d93a6e1cbde76d34866ffd9b39633572e6236 169ba759c536fcd807ee061e1831e4502a5f1416

      Description

      A regression has occured since 4.7

      when executing this code i get an invalid xml file with 4.8

      QFile f("c:/temp/toto.xml");
      f.open(QIODevice::WriteOnly);
      QXmlStreamWriter xml;
      xml.setDevice(&f);
      xml.setCodec("UTF-16");
      xml.writeStartDocument();
      xml.writeStartElement(QString::fromWCharArray(L"Categories"));
      xml.writeEndDocument();
      f.close();
      

        Attachments

        1. toto.xml - 4.7.4
          0.1 kB
        2. toto.xml - 4.8
          0.1 kB

          Issue Links

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

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              le_b sebastien B
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes