[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Jesse Silverman
Jesse Silverman added the comment: As Andre noted, it is good in IDLE. I also realize how convenient it is to read the real docs from there. I learned a lot about the state of console programming on Windows, in and out of Python, but I have no problem using IDLE when on Windows. -- _

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Andre Roberge
Andre Roberge added the comment: Terry: I just checked with Idle on Windows with Python 3.9.5 and the display works perfectly, with no incorrect characters. -- ___ Python tracker ___

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Jesse or Andre, please test interactive help in IDLE as pydoc then knows that it is *not* talking to Windows console. It then does not use more.com but prints the entire text at once. It should send it 'as is' and should ignore the console language and enc

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Eryk Sun
Eryk Sun added the comment: > Now many people want to use Python with UTF-8 mode in PowerShell > in Windows Terminal. And they don't want to care about legacy > encoding at all. Windows Terminal isn't relevant to the encoding issue. Applications interact with the console session to which the

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Inada Naoki
Inada Naoki added the comment: >> PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8") > FYI, $OutputEncoding in PowerShell has nothing to do with the python.exe and > more.com processes, nor the console session to which they're attached. >> PS > [System.Console]::OutputEncod

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Jesse Silverman
Jesse Silverman added the comment: "more.com" uses the console input codepage to decode the file, so a workaround is to run `chcp.com 65001` and run Python in UTF-8 mode, e.g. `py -X utf8=1`. Since reading non-ASCII UTF-8 is broken, you'll have to switch back to the old input codepage if you

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Eryk Sun
Eryk Sun added the comment: > I was one of the people who mistakenly thought that Python 3 operating > in the new Windows Terminal was going to magically leave us sitting > happily in completely UTF-8 compatible territory on Windows, not > realizing the complex long-term dependencies and reg

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Jesse Silverman
Jesse Silverman added the comment: Thank you so much Inada and Eryk and Steve! I was one of the people who mistakenly thought that Python 3 operating in the new Windows Terminal was going to magically leave us sitting happily in completely UTF-8 compatible territory on Windows, not realizing

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Steve Dower
Steve Dower added the comment: > If changing the console input codepage to UTF-8 fixes the mojibake problem, > then probably you're running Python in UTF-8 mode. I forget where I saw them, but there are some places where we incorrectly use stdin encoding for writing to stdout (I suppose assu

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Eryk Sun
Eryk Sun added the comment: > PS > [System.Console]::InputEncoding = $OutputEncoding If changing the console input codepage to UTF-8 fixes the mojibake problem, then probably you're running Python in UTF-8 mode. pydoc.tempfilepager() encodes the temporary file with the preferred encoding, whi

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: I confirmed this fixes the mojibake: ``` PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8") PS > [System.Console]::OutputEncoding = $OutputEncoding PS > [System.Console]::InputEncoding = $OutputEncoding ``` -- _

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: > In Windows, pydoc uses the old "more.com" pager with a temporary file that's > encoded with the default encoding, which is the process active codepage (i.e. > "ansi" or "mbcs"), unless UTF-8 mode is enabled. The "more.com" utility, > however, decodes the file

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Eryk Sun
Eryk Sun added the comment: > PS> [System.Console]::OutputEncoding The console's current output encoding is irrelevant to this problem. In Windows, pydoc uses the old "more.com" pager with a temporary file that's encoded with the default encoding, which is the process active codepage (i.e.

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Inada Naoki
Inada Naoki added the comment: Do you use PowerShell? Please run this command and paste the output. ``` PS> $OutputEncoding PS> [System.Console]::OutputEncoding ``` -- nosy: +methane ___ Python tracker

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Ned Deily
Change by Ned Deily : -- components: +Windows -Documentation nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Jesse Silverman
Jesse Silverman added the comment: I looked around some more and it definitely is not just one isolated instance. I noted a similar issue on the lines from CLASSES topic pasted here. I think it is all usages of the ellipsis in the context of the help text? Maybe also fancy quote marks that

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Andre Roberge
Andre Roberge added the comment: I observe something similar, though with different symbols. My Windows installation uses French (fr-ca) as default language. === help> COMPARISON Comparisons *** ... Formally, if *a*, *b*, *c*, à, *y*, *z* are expressions and *op1*, *op2*, à, *opN* are

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-05-31 Thread Jesse Silverman
New submission from Jesse Silverman : I didn't know whether to file this under DOCUMENTATION or WINDOWS. I recently discovered the joys of the interactive help in the REPL, rather than just help(whatever). I was exploring the topics and noticed multiple encoding or rendering errors. I realized I