summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/text/qstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 8e7e2e5dce..3f24665a8a 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -5204,7 +5204,7 @@ static QByteArray qt_convert_to_local_8bit(QStringView string)
if (localeCodec)
return localeCodec->fromUnicode(string);
#endif // textcodec
- return qt_convert_to_latin1(string);
+ return string.toUtf8();
}
/*!
@@ -5396,7 +5396,7 @@ QString QString::fromLocal8Bit_helper(const char *str, int size)
if (codec)
return codec->toUnicode(str, size);
#endif // textcodec
- return fromLatin1(str, size);
+ return fromUtf8(str, size);
}
/*! \fn QString QString::fromUtf8(const char *str, int size)