[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError
STINNER Victor
report at bugs.python.org
Thu Oct 18 08:44:22 EDT 2018
STINNER Victor <vstinner at redhat.com> added the comment:
This issue is not an asyncio bug: the bug occurs in subprocess.
The bug is not a subprocess bug: subprocess works as expected, it encodes Unicode with sys.getfilesystemencoding() (see os.fsencode()).
The bug is that you use non-ASCII strings whereas your filesystem encoding is ASCII.
You have a different options to fix *your* issue:
* Use a different locale which uses a UTF-8 locale
* Enable the Python 3.7 UTF-8 mode
* Wait for Python 3.7.1 (which enables automatically the UTF-8 Mode for LC_CTYPE="POSIX")
Note: You might want to read my ebook http://unicodebook.readthedocs.io/ which explains how to deal with Unicode.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35014>
_______________________________________
More information about the Python-bugs-list
mailing list