Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
-
-
13
-
Qt6_Foundation_ Sprint 11, Qt6_Foundation_ Sprint 13
-
bb6a73260ec8272647265f42180963604ad0f755 3f8eae848e5cf80b45d226ad3ca07664df0f55c6
Description
The placement of grouping characters in the whole-number portion of a number is currently done wrong. For (only) Indian, we special-case a group of the three least-significant digits with successive groups of two to the left of it; for everything else, it's all three-digit groups. The CLDR contains data that properly describes the correct placement of digits, with one size for the least-significant group and another for all more significant groups. We need to capture that data from CLDR for inclusion in our locale data and adapt the code to use it correctly.
This shall involve discarding the Indian-numbering-specific implementation; at the same time, the separator should be renamed from "thousands" separator.
Fortunately, "thousands" isn't used in the QLocale API: QLocale::NumberOption already uses the name "grouping separator", so we can reuse that.
QLocaleData::Flags needs its ThousandsGrouping renamed to GroupDigits.
The decimal separator and grouping "characters" also need to become QString (as they already are in QSystemLocale::query(QSystemLocale::QueryType, QVariant)), since they may be surrogate pairs in some numbering systems – see QTBUG-69324.
Attachments
Issue Links
- depends on
-
QTBUG-69324 QLocale can't represent outer plane characters
- Closed
-
QTBUG-81053 Upgrade remaining single-UTF16-codepoint members of QLocaleData
- Closed
-
QTBUG-81344 Clean up the CLDR-digestion python scripts
- Closed
- relates to
-
QTBUG-71914 QDoubleValidator::validate Accepts Numbers with Misaligned Separator Characters
- Closed
-
QTBUG-85409 QLocale: numbers output with wrong code points when using Suzhou numerals
- Closed
-
QTBUG-79902 QLocale: make fuller and more faithful use of the CLDR data
- Open
-
QTBUG-81343 QLocaleData::m_currency_rounding is unused
- Open
- replaces
-
QTBUG-24301 Indian number formatting not supported
- Closed
- resulted in
-
QTBUG-90690 No thousand separator for 4-digit numbers
- Closed
For Gerrit Dashboard: QTBUG-81050 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
288208,23 | Support digit-grouping correctly | dev | qt/qtbase | Status: MERGED | +2 | 0 |