From f5840944a6c29df162c5bdcaf488647f17877fab Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Mon, 8 Jul 2019 21:27:14 +0200 Subject: QByteArray: Clarify that QByteArrays always use the Latin-1 encoding ... irrespective from the users current locale. Fixes: QTBUG-76938 Change-Id: I78810a75ecf9e9f1067363ce56656124b6ddcefd Reviewed-by: Thiago Macieira --- src/corelib/tools/qbytearray.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index c2c2b9de28..2337d9f9c6 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -1072,12 +1072,11 @@ QByteArray qUncompress(const uchar* data, int nbytes) \section2 8-bit Character Comparisons In QByteArray, the notion of uppercase and lowercase and of which - character is greater than or less than another character is - locale dependent. This affects functions that support a case + character is greater than or less than another character is done + in the Latin-1 locale. This affects functions that support a case insensitive option or that compare or lowercase or uppercase their arguments. Case insensitive operations and comparisons will - be accurate if both strings contain only ASCII characters. (If \c - $LC_CTYPE is set, most Unix systems do "the right thing".) + be accurate if both strings contain only Latin-1 characters. Functions that this affects include contains(), indexOf(), lastIndexOf(), operator<(), operator<=(), operator>(), operator>=(), isLower(), isUpper(), toLower() and toUpper(). -- cgit v1.2.3