From 4ec7265991e6ff53893801b8724f224a3b5e1b15 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 18 Feb 2022 18:13:08 +0100 Subject: [PATCH] QStringConverter: make name matching locale-independent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing name lookup code used C's toupper() function for case-insensitive comparison. However, that function's result depends on the current locale. Since the matcher is supposed to match the likes of "iso-8859-1" and "latin-1", matching may fail in locales, such as Turkish, where toupper(i) is İ (or i, if the former isn't representable in the current charset), but toupper(I) remains I, causing a False Negative. To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function, which has the added advantage that it's inline. Pick-to: 6.3 6.2 Change-Id: I70613c0167d84e3dc3d282c61c716b5dd0b3e6bb Reviewed-by: Thiago Macieira