[issue1170] shlex have problems with parsing unicode
Éric Araujo
report at bugs.python.org
Sun Oct 23 07:42:51 CEST 2011
Éric Araujo <merwok at netwok.org> added the comment:
The second message in this page reports that StringIO.StringIO works, but when I pass a unicode string with non-ASCII chars there’s a method call that fails because of implicit unicode-to-str conversion:
Traceback (most recent call last):
File "/usr/lib/python2.7/shlex.py", line 150, in read_token
elif nextchar in self.wordchars:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xdf in position 63: ordinal not in range(128)
I’ll try to create a Shlex instance, replace self.wordchars with a decoded version and try again.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1170>
_______________________________________
More information about the Python-bugs-list
mailing list