From 1c7d7ae2d5c34447fc6cb6fbcc751a1c1fefc2fb Mon Sep 17 00:00:00 2001 From: GRiker Date: Sat, 30 Jan 2010 03:16:28 -0700 Subject: [PATCH] Fixed MOBI indexing for mixed case --- src/calibre/library/catalog.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index debe8487cc..6aa664a166 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -2512,6 +2512,7 @@ class EPUB_MOBI(CatalogPlugin): for (i,word) in enumerate(title_words): # Leading numbers optionally translated to text equivalent + # Capitalize leading sort word if i==0: if self.opts.numbers_as_text and re.search('[0-9]+',word): translated.append(EPUB_MOBI.NumberToText(word).text.capitalize()) @@ -2529,7 +2530,7 @@ class EPUB_MOBI(CatalogPlugin): word = '%10.2f' % float(re.sub('[^\d\.]','.',word)) except: word = '%10.2f' % float(EPUB_MOBI.NumberToText(word).number_as_float) - translated.append(word) + translated.append(word.capitalize()) else: if re.search('[0-9]+',word): # Coerce standard-width strings for numbers