STINNER Victor <vstin...@redhat.com> added the comment: Example of C locale coercion with Python 3.7:
$ env -i PYTHONCOERCECLOCALE=0 ./python -X utf8=0 -c 'import sys; print(ascii(sys.argv[1]))' 'hé' 'h\udcc3\udca9' $ env -i PYTHONCOERCECLOCALE=1 ./python -X utf8=0 -c 'import sys; print(ascii(sys.argv[1]))' 'hé' 'h\xe9' It works as expected no? What's wrong with the current implementation according to you, Nick? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34589> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com