IGN:Map macintosh encoding name to mac-roman

This commit is contained in:
Kovid Goyal 2009-03-12 16:19:07 -07:00
parent 0252b61bb1
commit 71e0157c98

View File

@ -97,6 +97,8 @@ def xml_to_unicode(raw, verbose=False, strip_encoding_pats=False,
if encoding is None:
encoding = force_encoding(raw, verbose)
try:
if encoding.lower().strip() == 'macintosh':
encoding = 'mac-roman'
raw = raw.decode(encoding, 'replace')
except LookupError:
encoding = 'utf-8'