Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be able to print the low control characters from CP437 in terminals #354

Open
mobluse opened this issue Aug 10, 2023 · 0 comments
Open

Be able to print the low control characters from CP437 in terminals #354

mobluse opened this issue Aug 10, 2023 · 0 comments

Comments

@mobluse
Copy link

mobluse commented Aug 10, 2023

CP437 has characters that can be printed (at least by poking them to screen memory) in the range 0-31 and 127, but now they cannot be printed in e.g. NetworkTerminal even before starting Telnet. They also don't work in the CP/M computers, but they can be printed in the PCEmulator. I think those control characters that doesn't move the cursor or sound bell in VT100/xterm type terminals should be printable and possible to type using e.g. Ctrl+@ to Ctrl+_ (including Ctrl+A to Ctrl+Z). 0, 7-15, and 27 cannot be printed in xterm type terminals, but 14-15 could perhaps be printed since they don't seem to do anything in the terminal. The characters that cannot be printed in xterm might be printed if one add a special escape code to be able to print them verbatim.

These are the low control characters (0-31) and 127 in codepage 437:

  ☺ ☻ ♥ ♦ ♣ ♠ • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼
► ◄ ↕ ‼ ¶ § ▬ ↨ ↑ ↓ → ← ∟ ↔ ▲ ▼
                              ⌂

This Python3 one-liner was used in Windows Terminal running Ubuntu to test this hypothesis:

for c in range(0,32): csi=chr(27)+"[";print(csi+str(c+1)+";20H",c,csi+str(c+1)+";25H",chr(c)+" "*c+chr(c+ord("@")))

pi@ideapad100_ ~ 2023-08-11 00_09_37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant