Eryk Sun <eryk...@gmail.com> added the comment:

> If you are lost with locale encodings, you can attempt to encode
> everything in UTF-8 and enables the Python UTF-8 Mode:

rushant is using Python 3.6. UTF-8 mode was added in 3.7, so it's not an option 
without first upgrading to 3.7. Also, it's important to note that the 
suggestion to "attempt to encode everything in UTF-8" includes whatever 
terminal encoding or shell-script file encoding is used for `export a="中文"`. If 
it's not using UTF-8, then setting the preferred encoding in Python to UTF-8 
isn't going to help.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43576>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to