summaryrefslogtreecommitdiffstats
path: root/src/corelib/xml/qxmlstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/xml/qxmlstream.cpp')
-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
}
}