Eryk Sun <[email protected]> added the comment:
Python supports Unicode in a Windows console session by using the console API's
wide-character functions (i.e. ReadConsoleW and WriteConsoleW) with UTF-16
encoded text. This is implemented in the io stack via io._WindowsConsoleIO, and
for PyOS_Readline (e.g. builtin `input`) via _PyOS_WindowsConsoleReadline. The
UTF-16 aspect is an internal detail that's presented externally as UTF-8 by
automatically converting between the two.
Notwithstanding the behavior of third-party packages, CPython intentionally
makes no changes to a console session's global settings, including:
* input & output codepages
* input & output modes (except for msvcrt.getwch, etc)
* cursor size and visibility
* screen-buffer size, font, colors, & attributes
* window size
* window title
----------
nosy: +eryksun
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41941>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com