summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/publicapi
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-12-20 14:13:36 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-12-22 07:50:48 +0000
commit3172695838372b54c2a488975578eaedaf094e80 (patch)
tree255318e0176e39470e0a65af3bf284ef5d81c9cc /tests/auto/quick/publicapi
parentcc5ec3fdf902c069a3e790638f4ee82646e30e75 (diff)
QPdfDocument: make code locale-independent
The C toupper/tolower functions are locale-dependent. Given the right locale (Türkiye, e.g.), tolower(I) is either - ı (LATIN SMALL LETTER DOTLESS I; if representable in current charset) - I (unchanged; if it isn't) Both results are wrong for the present use-case, so use US-ASCII-only QtMiscUtils::toAsciiLower() to side-step the issue. Besides, feeding unfiltered char values into tolower() is UB. You'd first have to cast to uchar: https://en.cppreference.com/w/cpp/string/byte/tolower Task-number: QTBUG-109235 Pick-to: 6.5 6.4 Change-Id: I57887581ba2e548e978223337d681124b30bf754 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/quick/publicapi')
0 files changed, 0 insertions, 0 deletions