This commit is contained in:
Kovid Goyal 2008-02-27 21:08:50 +00:00
parent f8039aaa19
commit 086d4c6d44

View File

@ -99,7 +99,8 @@ class BookHeader(object):
65001 : 'utf-8', 65001 : 'utf-8',
}[self.codepage] }[self.codepage]
except IndexError, KeyError: except IndexError, KeyError:
raise MobiError('Unknown codepage: %d'%self.codepage) print '[WARNING] Unknown codepage %d. Assuming cp-1252'%self.codepage
self.codec = 'cp1252'
if ident == 'TEXTREAD' or self.length < 0xF4: if ident == 'TEXTREAD' or self.length < 0xF4:
self.extra_flags = 0 self.extra_flags = 0