summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <[email protected]>2024-10-04 11:49:40 +0200
committerEdward Welbourne <[email protected]>2024-10-08 20:53:14 +0200
commitff58e09c8d5b3f505d5d3fe9a205e35e96de922d (patch)
tree0030f9d979bf943521eebe5add42eb1264445868 /util
parentbb854606ec8f95787dfd2a4d1b6bcaddbcf4d042 (diff)
Fix sorting of timezone alias table to be in case-insensitive order
The lookup into it is done case-insensitively (because user-supplied names of zones might not have the right case) but I forgot to make the sorting of the data table case-insensitive in the aliases. Regenerate data: only the qtimezone*_data_p.h are changed by the reindexing of zone aliases. Pick-to: 6.8 Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396 Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'util')
-rw-r--r--util/locale_database/qlocalexml.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/locale_database/qlocalexml.py b/util/locale_database/qlocalexml.py
index 0f85e8e16de..f9f2ba3d577 100644
--- a/util/locale_database/qlocalexml.py
+++ b/util/locale_database/qlocalexml.py
@@ -655,7 +655,8 @@ class QLocaleXmlWriter (object):
self.__openTag('zoneAliases')
# iana is a single IANA ID
# name has the same form, but has been made redundant
- for name, iana in sorted(alias.items()):
+ # Do case-insensitive sorting, to match how lookup is done:
+ for name, iana in sorted(alias.items(), key = lambda s: (s[0].lower(), s[1])):
if name == iana:
continue
self.asTag('zoneAlias', alias = name, iana = iana)