Eryk Sun <eryk...@gmail.com> added the comment: > It is set to use an OEM raster font.
Okay, then the issue can either be closed as third-party or changed to a documentation enhancement. It could be documented that Unicode support requires selecting a TrueType font in the console properties. "Raster Fonts" uses OEM with a lossy best-fit conversion (e.g. "α" -> "a"). > So I assume that with the UTF-8 flag set the font still has to be > set to a TTF-Font so it does not beep? Yes, the conversion to OEM for "Raster Fonts" occurs in the console itself. > I CP850 required to encode those characters via CP850 to the > bell character? Other OEM codepages have a different best-fit mapping. For example, codepage 437 maps U+2022 to ASCII bell, but not U+2024 or U+2219. > I was a bit lost on what happens under the hood encoding-wise as > sys.stdout.encoding just returns 'utf-8'. For a console file, the io module uses io._WindowsConsoleIO for the raw layer instead of io.FileIO. _WindowsConsoleIO internally uses the console's wide-character (UTF-16) API and converts to and from UTF-8. Overriding the standard I/O encoding to UTF-8 isn't needed for _WindowsConsoleIO. It's needed for regular files and pipes when standard I/O is redirected, since those still default to the process active codepage (usually system ANSI). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41821> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com