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

The DEC special graphics character set shouldn't have control characters #169

Closed
j4james opened this issue May 5, 2018 · 3 comments
Closed
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Available It's available in an Insiders build or a release
Milestone

Comments

@j4james
Copy link
Collaborator

j4james commented May 5, 2018

  • Your Windows build number:

Microsoft Windows [Version 10.0.16299.371]

  • What you're doing and what's happening:

When I use the ESC ( 0 escape sequence to enable the DEC special graphics character set, some of the characters don't seem to be correctly mapped. Specifically, code points \x62 to \x65, \x68, and \x69, which are meant to be glyphs representing the control characters (␉ ␌ ␍ ␊ ␤ ␋), and shouldn't be interpreted as the control characters themselves.

It's admittedly not particularly obvious from the mapping table provided in the VT100 manual, but I think it's a lot clearer in the VT220 manual, which lists both control characters and control character glyphs, so you can clearly see the difference.

As further confirmation, every Linux terminal emulator I've tested has displayed these code points as glyphs and not interpreted them as control characters. Here is a simple test case:

printf "\e(0[b][c][d][e][h][i]\e(B\n"

The screenshot below shows the output from XTerm, Gnome Terminal, Konsole, and the Windows console.

image

And note that the two characters that Windows does appear to display (with a replacement char) are still not correct. Those are being mapped to the "form feed" and "vertical tab" control characters, which Windows doesn't implement. If you had a font that supported those glyphs you'd see them as characters \x0C and \x0B (♀ and ♂) from code page 437.

  • What's wrong / what should be happening instead:

When the DEC special graphics character set is enabled, code points \x62 to \x65, \x68, and \x69 should be displayed as glyphs and not interpreted as control characters.

@zadjii-msft zadjii-msft added Work-Item It's being tracked by an actual work item internally. (to be removed soon) console labels May 7, 2018
@zadjii-msft zadjii-msft added this to the RS5 milestone May 7, 2018
@zadjii-msft zadjii-msft added Product-Conhost For issues in the Console codebase and removed console labels May 21, 2018
@zadjii-msft
Copy link
Member

Definitely my bad on reading the spec wrong. Good catch!

It took me long enough to find a font that even had those symbols, but fixing the bug was relatively straightforward. In code review now :)

@zadjii-msft zadjii-msft added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Work-Item It's being tracked by an actual work item internally. (to be removed soon) labels Jul 6, 2018
@DHowett-MSFT DHowett-MSFT removed the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Oct 25, 2018
@DHowett-MSFT
Copy link
Contributor

Looks like this is fixed in the october 2018 update.

@jerch
Copy link

jerch commented Feb 2, 2020

@j4james I am not quite sure if the change is the correct behavior - the manual you referred to clearly states, that the graphics set only gets loaded into GR/GL? Which would skip the C0/C1 positions. Also the other charsets listed before in the manual show the control codes as well with kinda the same notation.

Following the parser suggested by VT100.net there seems to be no link between a selected charset and a different behavior/repr of C0 codes. Have not yet checked if DEC STD 070 has something more to tell here. Might have to find out the hard way, not sure if my old vt420 still works...

Woops nvm - thought this is about the C0 char, but its about \x62 to \x65, \x68, and \x69 - so all good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Conhost For issues in the Console codebase Resolution-Fix-Available It's available in an Insiders build or a release
Projects
None yet
Development

No branches or pull requests

4 participants