New submission from Xuefer x <[email protected]>:
using iconv:
$ printf "\xf9\xd8" | iconv -f big5 -t utf-8 | xxd
0000000: e8a3 8f ...
$ printf "\xe8\xa3\x8f" | iconv -f utf-8 -t big5 | xxd
0000000: f9d8 ..
using python
>>> print "\xf9\xd8".decode("big5")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'big5' codec can't decode bytes in position 0-1: illegal
multibyte sequence
>>> print "\xe8\xa3\x8f".decode("utf-8").encode("big5")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'big5' codec can't encode character u'\u88cf' in position
0: illegal multibyte sequence
----------
components: Unicode
messages: 98865
nosy: Xuefer.x
severity: normal
status: open
title: cannot decode from or encode to big5 \xf9\xd8
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7856>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com