Message294046
How about this?
The character encoding is platform-dependent. Non-Windows
platforms use the locale encoding (see
locale.getpreferredencoding()).
On Windows, UTF-8 is used for console character
devices (i.e. CON, CONIN$, and CONOUT$). However, this
can be overridden to use the console as a generic
character device by setting the environment variable
PYTHONLEGACYWINDOWSSTDIO before starting Python. Non-
character devices such as disk files and pipes use the
system locale encoding (i.e. the ANSI codepage).
Character devices such as NUL (i.e. isatty() returns
True) use the value of the console input and output
codepages at startup, respectively for stdin and
stdout/stderr. This defaults to the system locale
encoding if the process is not initially attached to a
console.
Under all platforms, you can override this value by
setting the PYTHONIOENCODING environment variable before
starting Python. However, for the Windows console, this
only applies when PYTHONLEGACYWINDOWSSTDIO is also set. |
|
Date |
User |
Action |
Args |
2017-05-20 18:37:01 | eryksun | set | recipients:
+ eryksun, paul.moore, tim.golden, docs@python, zach.ware, steve.dower |
2017-05-20 18:37:01 | eryksun | set | messageid: <1495305421.4.0.147160035599.issue30410@psf.upfronthosting.co.za> |
2017-05-20 18:37:01 | eryksun | link | issue30410 messages |
2017-05-20 18:37:01 | eryksun | create | |
|