path: root/src/corelib/text/qlocale_p.h
diff options
authorEdward Welbourne <>2020-01-15 13:14:20 +0100
committerEdward Welbourne <>2020-01-30 17:56:14 +0100
commitd5bb8d5150498dc059e8c17f224c66fb1a6bcf32 (patch)
tree31e3c0f211769eec47f8e04058d51adbc6494f40 /src/corelib/text/qlocale_p.h
parented080c64ae21d22115d16780a5903d7cc4fd1546 (diff)
Preserve the case of the exponent separator CLDR supplies
We have long (since 4.5.1) coerced it to lower-case, for no readily apparent, much less documented, reason. CLDR says most locales use an upper-case E for this - let's actually use what CLDR says we should use. The code that matches the exponent separator was doing so case-insensitively in any case; that needed adaptation now that the separator's case isn't pre-determined; and, in any case, should have been done using case-folding rather than upper-casing. In the process, removed some spurious checks for "'e' or 'E'" in the result, since the exponent separator is always represented by 'e' (and an 'e' might also be present for the separate reason of its use as a beyond-decimal digit representing fourteen). [ChangeLog][QtCore][QLocale] QLocale::exponential() now preserves the case of the CLDR source, where previously it was lower-cased. Change-Id: Ic9ac02136cff79cb9f136d72141b5dbf54d9e0a6 Reviewed-by: Lars Knoll <>
Diffstat (limited to 'src/corelib/text/qlocale_p.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/text/qlocale_p.h b/src/corelib/text/qlocale_p.h
index bb24009523..938d7bbb6a 100644
--- a/src/corelib/text/qlocale_p.h
+++ b/src/corelib/text/qlocale_p.h
@@ -417,7 +417,7 @@ inline char QLocaleData::digitToCLocale(QChar in) const
if (in == m_group)
return ',';
- if (in == m_exponential || in == QChar(QChar::toUpper(m_exponential)))
+ if (in == m_exponential || in.toCaseFolded().unicode() == QChar::toCaseFolded(m_exponential))
return 'e';
// In several languages group() is a non-breaking space (U+00A0) or its thin