[issue17110] sys.argv docs should explaining how to handle encoding issues

Inada Naoki report at bugs.python.org
Wed Jun 17 21:42:25 EDT 2020


Inada Naoki <songofacandy at gmail.com> added the comment:

There is no strict guarantee.

I think ASCII, UTF-8, latin1 with surrogateescape guarantee roundtrip.

Other legacy encodings like cp932 may not roundtrip. But it is not a huge problem because only Windows use them typically.
On Windows:

* wchar_t is used in most case, instead of fsencoding
* fsencoding is now UTF-8 by default

In other words, if you are using legacy encoding on Unix, it may be not roundtripping.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue17110>
_______________________________________


More information about the Python-bugs-list mailing list