Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5
-
None
-
-
8
-
05c8a4861 (dev), 31d64b725 (6.9), 5d90dea2a (6.8), 507d8cc0e (dev), 55c60776e (6.9), dd45d2bb0 (6.8), b4418b6e6 (tqtc/lts-6.5), 672c60ea7 (tqtc/lts-6.5)
-
Foundation PM Staging
Description
Because QLocale::toString() takes a single character to determine format, and (following various C standard library functions) lets the caller control the case of the exponential separator by the case of that character, it obliges the caller to over-ride the locale's own choice of case for that separator. We hit a similar problem with the AM/PM indicator character formats for QTime and QDateTime, see QTBUG-95790, but were able to resolve that by adding new mixed-case forms, "aP" and "Ap", of the existing two-character format specifiers to cover the locale-appropriate case; however, with a single-character format, we don't have a similar option. (Splitting the difference between 'e' and 'E', as ASCII codes, I find 'U' is half-way between; likewise 'W' is the mid-point of 'g' and 'G'; but this is not necessarily a good basis for choosing the new codes.) We should probably aim to avoid using format codes already in use by POSIX APIs, unless we can find one that some locale-aware API uses for the purposes in hand. So:
- Check existing POSIX APIs for such a precedent; use it if found; otherwise,
- See what format characters none of those APIs use for any format and pick two of these to serve as our locale-appropriate-case equivalents of 'e'/'E' and 'g'/'G'
- Implement that.
We shall need, internally, an analog of QLocaleData::CapitalEorX, LowerEorX, to force the case of the exponent (or 0x, sadly now tied to it) to lower-case; then change the code that upper-cases on CapitalEorX else (since the fix to QTBUG-134768) lower-cases to make the lower-casing conditional on LowerEorX and just return the existing-case form otherwise.
Attachments
Issue Links
- resulted from
-
QTBUG-134768 QLocale::toStrings uses E instead of e
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134785 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
632290,6 | Correct case of QLocale::toString(double, ...)'s exponent separator | dev | qt/qtbase | Status: MERGED | +2 | 0 |
633292,2 | Correct case of QLocale::toString(double, ...)'s exponent separator | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
633357,2 | Correct case of QLocale::toString(double, ...)'s exponent separator | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
633532,2 | Correct case of QLocale::toString(double, ...)'s exponent separator | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |
634009,3 | Fix qlocale_test.py to pass after QLocale change | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
634056,2 | Fix qlocale_test.py to pass after QLocale change | 6.9 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
634060,2 | Fix qlocale_test.py to pass after QLocale change | 6.8 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
634097,1 | Fix qlocale_test.py to pass after QLocale change | tqtc/6.8.3 | pyside/tqtc-pyside-setup | Status: ABANDONED | 0 | 0 |
634337,3 | Fix qlocale_test.py to pass after QLocale change | tqtc/lts-6.5 | pyside/tqtc-pyside-setup | Status: MERGED | +2 | +1 |