New submission from Jesse Silverman <jessevsilver...@gmail.com>: 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 stupidly wasn't using the Windows Terminal program but the default console. I addressed that and they persisted in Windows Terminal. I upgraded from 3.9.1 to 3.9.5...same deal.
I tried running: Set-Item -Path Env:PYTHONUTF8 -Value 1 before starting the REPL, still no dice. I confirmed this worked in the same session: >>> ustr2='ʑʒʓʔʕʗʘʙʚʛʜʝʞ' >>> ustr2 'ʑʒʓʔʕʗʘʙʚʛʜʝʞ' It does. The help stuff that doesn't render correctly is under topic COMPARISON: lines 20, 21 and 25 of this output contain head-scratch-inducing mystery characters: help> COMPARISON Comparisons *********** Unlike C, all comparison operations in Python have the same priority, which is lower than that of any arithmetic, shifting or bitwise operation. Also unlike C, expressions like "a < b < c" have the interpretation that is conventional in mathematics: comparison ::= or_expr (comp_operator or_expr)* comp_operator ::= "<" | ">" | "==" | ">=" | "<=" | "!=" | "is" ["not"] | ["not"] "in" Comparisons yield boolean values: "True" or "False". Comparisons can be chained arbitrarily, e.g., "x < y <= z" is equivalent to "x < y and y <= z", except that "y" is evaluated only once (but in both cases "z" is not evaluated at all when "x < y" is found to be false). Formally, if *a*, *b*, *c*, ΓǪ, *y*, *z* are expressions and *op1*, *op2*, ΓǪ, *opN* are comparison operators, then "a op1 b op2 c ... y opN z" is equivalent to "a op1 b and b op2 c and ... y opN z", except that each expression is evaluated at most once. Note that "a op1 b op2 c" doesnΓÇÖt imply any kind of comparison between *a* and *c*, so that, e.g., "x < y > z" is perfectly legal (though perhaps not pretty). That is: ΓǪ, ΓǪ, ΓÇÖ em-dash or ellipsis might be involved somehow...maybe fancy apostrophe? My current guess is that it isn't about rendering anymore, because something went awry further upstream? Thanks! ---------- assignee: docs@python components: Documentation messages: 394817 nosy: docs@python, jessevsilverman priority: normal severity: normal status: open title: Is there a mojibake problem rendering interactive help in the REPL on Windows? type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44275> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com