From cec8cdba4d1b856e17c8743ba8803349d42dc701 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 4 Sep 2016 09:55:59 +0200 Subject: QTextStream: log the defect that op<< uses Latin 1 The rest of Qt, including the QString constructor, uses UTF-8 to interpret narrow character literals. The fact that QTextStream uses Latin 1 should be considered a defect. We can't fix this in Qt 5, so log it for consideration in Qt 6. Change-Id: I9e96ecd4f6aa4ff0ae08fffd14710fa61673db57 Reviewed-by: Marc Mutz --- src/corelib/io/qtextstream.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/io/qtextstream.cpp') diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index b8db23329a..4fdb1505ff 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -2644,6 +2644,7 @@ QTextStream &QTextStream::operator<<(const char *string) { Q_D(QTextStream); CHECK_VALID_STREAM(*this); + // ### Qt6: consider changing to UTF-8 d->putString(QLatin1String(string)); return *this; } -- cgit v1.2.3