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

QXmlStreamWriter writes invalid xml in UTF-16

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P1: Critical
    • Resolution: Done
    • 4.8.0, 4.8.2, 5.0.0 Beta 1
    • 5.0.0 RC 1
    • None
    • windows 7 x64
      visual c++ 2010
    • 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.8
          0.1 kB
        2. toto.xml - 4.7.4
          0.1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-23310
          # Subject Branch Project Status CR V

          Activity

            People

              smd Jan Arve
              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