New submission from Liu DongMiao <liudongm...@gmail.com>: HTMLParser (Python 2.6.2) Cannot deal with mixture of arbitrary data and character reference.
In line 365-373, replaceEntities(s) returns unichr(charref) in unicode, which cannot be a mixture with arbitrary data in str. A fix way: replace unichr(c) with unichr(c).encode('utf-8'). ---------- components: Library (Lib) files: chinese.py messages: 91128 nosy: liudongm...@gmail.com severity: normal status: open title: HTMLParser cannot deal with mixture of arbitrary data and character reference type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file14613/chinese.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6611> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com