This commit is contained in:
Kovid Goyal 2021-10-24 22:20:25 +05:30
parent 36573fe5c8
commit 1518344dd8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -116,8 +116,9 @@ def clean_user_categories(dbcache):
numeric_collation = tweaks['numeric_collation']
def first_digit(x):
global numeric_collation
c = icu_upper(x.sort or x.name or ' ')[0]
# The idea is that '9999999999' is larger than any digit so all digits
# will sort in front. Non-digits will sort according to their ICU first letter

View File

@ -116,7 +116,6 @@ class TestICU(unittest.TestCase):
def test_collation_order(self):
'Testing collation ordering'
from calibre.utils.icu import collation_order
for group in [
(self.ae, ('Šaa', 'Smith', 'Solženicyn', 'Štepánek')),
(self.ae, ('11', '011')),