fix #1216 ignore thousand separators

This commit is contained in:
j 2013-02-01 16:13:40 +05:30
parent 4ae8783d27
commit 284cb97f1c

View file

@ -569,6 +569,7 @@ def sort_string(string):
string = string.replace(u'Æ', 'AE').replace(u'Ø', 'O').replace(u'Þ', 'Th')
#pad numbered titles
string = re.sub('(\d),(\d{3})', '\\1\\2', string)
string = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), string)
return unicodedata.normalize('NFKD', string)