fix handle_ansi_escape #11

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants

dorosh commented Oct 11, 2011

chr(129)
'\x81'
char = '\x81'.decode('cp932')
Traceback (most recent call last):
File "", line 1, in
UnicodeDecodeError: 'cp932' codec can't decode byte 0x81 in position 0: incomplete multibyte sequence

I made a temporary solution for def handle_ansi_escape(self, code): in rtf15.reader.py

Contributor

yairchu commented Feb 23, 2015

I believe that using "incrementaldecoder" is probably the cleanest way.
btw see #15

Owner

brendonh commented May 18, 2015

Fixed in 381a306 and I've included your test file in the (new!) RTF tests.

brendonh closed this May 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment