MOBI metadata: Correctly handle long titles in non ASCII encodings when reading metadata

This commit is contained in:
Kovid Goyal 2010-02-15 14:01:15 -07:00
parent 198ef55095
commit c7aabab2db

View File

@ -67,7 +67,10 @@ class EXTHHeader(object):
pass pass
elif id == 503: # Long title elif id == 503: # Long title
if not title or title == _('Unknown'): if not title or title == _('Unknown'):
title = content try:
title = content.decode(codec)
except:
pass
#else: #else:
# print 'unknown record', id, repr(content) # print 'unknown record', id, repr(content)
if title: if title: