diff options
Diffstat (limited to 'src/corelib/serialization/qjsonparser.cpp')
| -rw-r--r-- | src/corelib/serialization/qjsonparser.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/corelib/serialization/qjsonparser.cpp b/src/corelib/serialization/qjsonparser.cpp index 5dc2a309158..2514319e0e9 100644 --- a/src/corelib/serialization/qjsonparser.cpp +++ b/src/corelib/serialization/qjsonparser.cpp @@ -413,10 +413,7 @@ static void sortContainer(QCborContainerPrivate *container) if (bKey.flags & QtCbor::Element::StringIsUtf16) return QCborContainerPrivate::compareUtf8(aData, bData->asStringView()); - // We're missing an explicit UTF-8 to UTF-8 comparison in Qt, but - // UTF-8 to UTF-8 comparison retains simple byte ordering, so we'll - // abuse the Latin-1 comparison function. - return QtPrivate::compareStrings(aData->asLatin1(), bData->asLatin1()); + return QtPrivate::compareStrings(aData->asUtf8StringView(), bData->asUtf8StringView()); } }; |
