in reply to Re^6: Key bindings in the Debugger
in thread Key bindings in the Debugger
Now we need others to replicate the issue.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Key bindings in the Debugger
by pryrt (Abbot) on May 25, 2025 at 02:04 UTC | |
CP437 only has § in the 0x15, which is in the control codes section, so maybe upder CP437, it's being treated as a NAK which might confuse Term::ReadLine Switching back to powershell, the chcp 65001 doesn't fix everything, because when I paste in I get x "┬º" Specifically:
PS C:\Users\pryrt> chcp Active code page: 437 PS C:\Users\pryrt> chcp 65001 Active code page: 65001 PS C:\Users\pryrt> perl -wde 1 Can't figure out your console, using stdin: No such file or directory Loading DB routines from perl5db.pl version 1.80 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): 1 DB<1> x "§" 0 '§' DB<2> x Win32::GetACP() 0 1252 DB<3> x Win32::GetOEMCP() 0 437 DB<4> x Win32::GetConsoleCP() 0 65001 DB<5> x Win32::GetConsoleOutputCP() 0 437 when looking at the same Win32 functions under the now-working cmd.exe environment, the difference is that Win32::GetConsoleOutputCP() is 65001, not 437. So then in the powershell window, I tried:
Yep. Hope this helps. edits: fix code/pre tags to get § to show up right in the various locations | [reply] [d/l] [select] |
by LanX (Saint) on May 26, 2025 at 11:03 UTC | |
Something like this makes sense and reflects my hunch. Not sure how Strawberry should address this best.
Cheers Rolf
| [reply] |
by pryrt (Abbot) on May 26, 2025 at 14:21 UTC | |
However, maybe it would be nice if the debugger on Strawberry (or any Windows perl build) would at least tell you the Win32::GetConsoleCP and Win32::GetConsoleOutputCP values (much like it warns you that it cannot figure out the console) -- I don't think Strawberry customizes perl5db.pl , so I believe that means that it would have to be changed in the main perl source code. In order to make sure I'm always in UTF-8 mode, I set up the Autorun registry entry for cmd.exe years ago. This conversation prompted me to research, and I have confirmed that I can use the $PROFILE file for powershell to do something similar: With those, then when I launch the debugger from either command-line, the codepages are set to 65001 (UTF-8) for both input and output. | [reply] [d/l] [select] |
by LanX (Saint) on May 26, 2025 at 14:56 UTC |