Antoine Pitrou added the comment:
> There was no unicode encode error generated! Is it because the problem
> is fixed?
No, it's not fixed.
First, it seems you are testing with Python 2 (otherwise you would get
"b'bytes'", not "bytes"). Python 2 won't have a problem here, since it treats
everything as bytestrings.
Second, to evidence the issue you must pass a non-ASCII string. For example:
$ ./python a.py `echo éléphant|iconv -t latin1`
Traceback (most recent call last):
File "a.py", line 4, in <module>
print(sys.argv[1])
UnicodeEncodeError: 'utf-8' codec can't encode character '\udce9' in position
0: surrogates not allowed
----------
nosy: +pitrou
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue17110>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com