qt5base-lts/util/locale_database
Edward Welbourne e45d05dfc0 Convert UTC offset table look-ups to binary chop
The table was almost sorted by offset - its UTC entry, with offset 0,
was at the front rather than first among the offset 0 entries. The
lookups in it were being done as if the IDs were in space-joined lists
(as for the IANA IDs in the Windows table), splitting on space,
despite the fact that it had separate entries for different IDs at the
same offset (this only arose for offset 0). So actually massage the
input table in python to combine IDs with the same offset using space,
placing UTC first among the offset 0 entries, and ensure the C++ table
is sorted. Regenerated the CLDR data tables using the updated script.

In the process, fix an off-by-one error in the iteration over
space-joined IDs, where the search only advanced to the space, rather
than to just after it. That wasn't a problem before, but now would be.

Change-Id: Ib49c27bac269b557166fa10738c3e396d58456c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-11-03 18:27:13 +01:00
..
testlocales Preparations to deprecate QItemDelegate 2023-10-05 21:08:45 +02:00
cldr2qlocalexml.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
cldr2qtimezone.py Convert UTC offset table look-ups to binary chop 2023-11-03 18:27:13 +01:00
cldr.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
dateconverter.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
enumdata.py Change enumdata.py names so comments read more naturally 2023-08-09 17:53:45 +02:00
formattags.txt
iso639_3.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
ldml.py Cope with CLDR data conflict decimal == group 2023-08-01 15:36:20 +02:00
localetools.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
qlocalexml2cpp.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
qlocalexml.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
qlocalexml.rnc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
README Update CLDR to v37, adding Nigerian Pidgin as a new language 2020-10-26 15:28:59 +02:00

locale_database is used to generate qlocale data from CLDR.

CLDR is the Common Locale Data Repository, a database for localized
data (like date formats, country names etc).  It is provided by the
Unicode consortium.

See cldr2qlocalexml.py for how to run it and qlocalexml2cpp.py to
update the locale data tables (principally text/qlocale_data_p.h and
time/q*calendar_data_p.h under src/corelib/). See enumdata.py for when
and how to update the data it provides. You shall definitely need to
pass --no-verify or -n to git commit for these changes.

See cldr2qtimezone.py on how to update tables of Windows-specific
names for zones and UTC-offset zone names.