[Qt-interest] QXmlStreamWriter not adding encoding attribute.
Scott Aron Bloom
Scott.Bloom at onshorecs.com
Tue May 17 01:12:40 CEST 2011
I would try adding a text element... It could be the encoding only gets
set after a elemtn is created that needs the encoding
Scott
From: qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com
[mailto:qt-interest-bounces+scott.bloom=onshorecs.com at qt.nokia.com] On
Behalf Of JD Guzman
Sent: Monday, May 16, 2011 3:44 PM
To: qt-interest
Subject: [Qt-interest] QXmlStreamWriter not adding encoding attribute.
Hello all,
Now I may be doing something wrong but I can't seem to get the xml
stream writer to add the encoding attribute to the xml tag. Here is my
sample code.
QString meta;
QXmlStreamWriter writer(&meta);
writer.setAutoFormatting(true);
writer.writeStartDocument();
writer.writeEndDocument();
return meta;
Here is what the output looks like.
<?xml version="1.0"?>
As you can see this is not what I woud expect which is.
<?xml version="1.0" encoding="UTF-8"?>
Any ideas?
Regards,
JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110516/d73f9825/attachment.html
More information about the Qt-interest-old
mailing list