summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-12-18 10:49:51 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-01-06 15:25:58 (GMT)
commit5529a356368b31998e859e3fb5f94e85c16447aa (patch)
treea593e4fbd0c91ef183ea0df10640b7a2c9ee2ebe /src/corelib/xml
parentf8780558e3fc68321a0dd6dcef611eeee0805a2e (diff)
downloadQt-5529a356368b31998e859e3fb5f94e85c16447aa.zip
Qt-5529a356368b31998e859e3fb5f94e85c16447aa.tar.gz
Qt-5529a356368b31998e859e3fb5f94e85c16447aa.tar.bz2
Temporary hackiesh solution to prevent BOM in the xml data.
We don't want to have byte-order-mark in the middle of the written string. Task-number: QTBUG-6893 Reviewed-by: Thiago
Diffstat (limited to 'src/corelib/xml')
-rw-r--r--src/corelib/xml/qxmlstream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 9f8867f..f987a31 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -3006,7 +3006,7 @@ QXmlStreamWriterPrivate::QXmlStreamWriterPrivate(QXmlStreamWriter *q)
#ifndef QT_NO_TEXTCODEC
codec = QTextCodec::codecForMib(106); // utf8
encoder = codec->makeEncoder();
- encoder->fromUnicode(QLatin1String("")); // no byte order mark for utf8
+ encoder->state.flags |= QTextCodec::IgnoreHeader; // no byte order mark for utf8
#endif
inStartElement = inEmptyElement = false;
wroteSomething = false;
@@ -3282,7 +3282,7 @@ void QXmlStreamWriter::setCodec(QTextCodec *codec)
delete d->encoder;
d->encoder = codec->makeEncoder();
if (codec->mibEnum() == 106)
- d->encoder->fromUnicode(QLatin1String("")); // no byte order mark for utf8
+ d->encoder->state.flags |= QTextCodec::IgnoreHeader; // no byte order mark for utf8
}
}