[issue23901] Force console stdout to use UTF8 on Windows

2017-03-26 Thread Martin Panter
Martin Panter added the comment: This seems to be discussing the same sort of stuff that ended up with the Issue 1602 implementation. -- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> windows console doesn't print or input

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-18 Thread STINNER Victor
STINNER Victor added the comment: If sys.stdout is modified, it must be carefully tested in various scenario: - Windows console, default config - Windows console, TrueType font - PowerShell = see #21927, it looks like PowerShell has its own set of Unicode issues - Redirect output into a file -

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-13 Thread Paul Moore
Paul Moore added the comment: My proof-of-concept attempt to use _O_U8TEXT resulted in some very bizarre behaviour - odd buffering of the interactive interpreter output and what appear to be Chinese characters being displayed for normal (ASCII) interactions. I suspect there is some oddity

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-09 Thread Paul Moore
Paul Moore added the comment: Doh. That latter approach (a RawIOBase implementation) is *precisely* what win_unicode_console does for stdout (using utf16le rather than utf8 as that's the native Windows encoding used by WriteConsole). So (a) yes it would work, and (b) it has already

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-09 Thread Paul Moore
New submission from Paul Moore: Console code page issues are a consistent source of problems on Windows. It would be nice, given that the Windows console has Unicode support, if Python could write the full range of Unicode to the console by default. The MSVC runtime appears to have a flag

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-09 Thread Paul Moore
Paul Moore added the comment: Generally, my understanding is that the console does pretty badly at supporting Unicode via the normal WriteFile APIs and the code page support (mainly because support for the UTF8 code page is rubbish). But the WriteConsole API does, I believe, have pretty solid

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-09 Thread R. David Murray
R. David Murray added the comment: There are a lot of issues in this tracker (for some definition of a lot) that indicate that the console does *not* support unicode. So if you are writing utf-8 I wouldn't expect this to work. (If it were an API taking unicode directly, that might be a

[issue23901] Force console stdout to use UTF8 on Windows

2015-04-09 Thread STINNER Victor
STINNER Victor added the comment: There are a lot of issues in this tracker (for some definition of a lot) that indicate that the console does *not* support unicode. The main issue is the issue #1602. -- nosy: +haypo ___ Python tracker