[Qt-interest] Have QXmlStreameWriter write the encoding information

Andreas Pakulat apaku at gmx.de
Thu Jun 4 09:37:34 CEST 2009


On 04.06.09 01:19:57, Aleksandar Lazic wrote:
> On Mit 03.06.2009 23:08, Andreas Pakulat wrote:
> >
> >In fact, Qt's XmlStreamReader won't read the result back in, see this
> >example:
> >
> >,----[ main.cpp ]-
> >| #include <QtCore>
> >| #include <QDebug>
> >| #include <QtXml>
> >| 
> >| int main(int argc, char** argv)
> >| {
> >|     QString tmp;
> >|     QXmlStreamWriter w(&tmp);
> 
> Please can you try this:

I know that works, I was proving to Lingfa that adding a PI that includes
the encoding will still get you a broken XML if you use QString as output
for the writer.

Andreas

-- 
Domestic happiness and faithful friends.



More information about the Qt-interest-old mailing list