id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2506	epub2lrf creates file that raises UnicodeDecodeError when loaded	jace	kovidgoyal	"I used eCub to generate an epub file from HTML sources. This file is viewable using Calibre's viewer, but not on my PRS-505, where all pages show as blank.

To get around this, I used epub2lrf, but the resultant file freezes the PRS-505 and shows the following error in Calibre's viewer.

{{{
  File ""build/bdist.linux-i686/egg/calibre/ebooks/lrf/lrfparser.py"", line 160, in main
  File ""build/bdist.linux-i686/egg/calibre/ebooks/lrf/lrfparser.py"", line 28, in parse
  File ""build/bdist.linux-i686/egg/calibre/ebooks/lrf/lrfparser.py"", line 56, in _parse_objects
  File ""build/bdist.linux-i686/egg/calibre/ebooks/lrf/objects.py"", line 844, in initialize
  File ""build/bdist.linux-i686/egg/calibre/ebooks/lrf/objects.py"", line 705, in add_text
  File ""/usr/lib/python2.6/encodings/utf_16_le.py"", line 16, in decode
    return codecs.utf_16_le_decode(input, errors, True)
UnicodeDecodeError: 'utf16' codec can't decode bytes in position 262-263: illegal UTF-16 surrogate
}}}

The attached book's HTML sources are available from http://twobits.net/"	defect	closed	minor		LRF Output	trunk	fixed		
