[issue35883] Python startup fails with a fatal error if a command line argument contains an invalid Unicode character

STINNER Victor report at bugs.python.org
Sat Mar 13 08:22:06 EST 2021


STINNER Victor <vstinner at python.org> added the comment:

> Right, enabling explicitly the Python UTF-8 Mode works around the issue

When the Python UTF-8 Mode is used, on macOS or on Android, Python uses its own UTF-8 decoder which respects the RFC 3629: it rejects characters outside [U+0000; U+10ffff].

Otherwise, Python relies on the libc mbstowcs() decoder which may or may not create characters outside the [U+0000; U+10ffff] range. I understand that this issue is mostly about the UTF-8 encoding, I don't think that other encodings can produce characters greater than U+10ffff code point.

----------

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


More information about the Python-bugs-list mailing list