-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Filter out control characters that don't do anything #15075
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
microsoft-github-policy-service
bot
added
Issue-Task
It's a feature request, but it doesn't really need a major design.
Area-VT
Virtual Terminal sequence support
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
labels
Mar 30, 2023
carlos-zamora
approved these changes
Apr 3, 2023
DHowett
reviewed
Apr 4, 2023
DHowett
approved these changes
Apr 4, 2023
Want to make sure @zadjii-msft signs as well, since VT was once his wheelhouse |
zadjii-msft
approved these changes
Apr 5, 2023
1 task
DHowett
pushed a commit
that referenced
this pull request
Jan 16, 2024
Up to now we've using `U+2E2E` (reverse question mark) to represent the `SUB` control glyph. This PR changes the glyph to `U+2426` (substitute form two), which is also rendered as a reverse question mark, but is more semantically correct. The original `SUB` control rendering was implemented in PR #15075. I've manually confirmed that `printf "\x1A"` is now shown as a reverse question mark in OpenConsole when using the Cascadia Code font. That would not previously have worked, because `U+2E2E` is not supported by Cascadia Code. Closes #16558
DHowett
pushed a commit
that referenced
this pull request
Jan 22, 2024
Up to now we've using `U+2E2E` (reverse question mark) to represent the `SUB` control glyph. This PR changes the glyph to `U+2426` (substitute form two), which is also rendered as a reverse question mark, but is more semantically correct. The original `SUB` control rendering was implemented in PR #15075. I've manually confirmed that `printf "\x1A"` is now shown as a reverse question mark in OpenConsole when using the Cascadia Code font. That would not previously have worked, because `U+2E2E` is not supported by Cascadia Code. Closes #16558 (cherry picked from commit 92f9ff9) Service-Card-Id: 91559316 Service-Version: 1.19
DHowett
pushed a commit
that referenced
this pull request
Jan 23, 2024
Up to now we've using `U+2E2E` (reverse question mark) to represent the `SUB` control glyph. This PR changes the glyph to `U+2426` (substitute form two), which is also rendered as a reverse question mark, but is more semantically correct. The original `SUB` control rendering was implemented in PR #15075. I've manually confirmed that `printf "\x1A"` is now shown as a reverse question mark in OpenConsole when using the Cascadia Code font. That would not previously have worked, because `U+2E2E` is not supported by Cascadia Code. Closes #16558 (cherry picked from commit 92f9ff9) Service-Card-Id: 91559315 Service-Version: 1.18
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-VT
Virtual Terminal sequence support
Issue-Task
It's a feature request, but it doesn't really need a major design.
Priority-2
A description (P2)
Product-Conhost
For issues in the Console codebase
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On a real VT terminal, most of the control characters that don't do
anything are supposed to be filtered out, and not written to the buffer.
Up to to now, though, we've only been filtering out
NUL
. This PRextends our control processing to filter the remaining characters that
aren't supposed to be displayed.
We introduced filtering for the
NUL
control in PR #3015.The are two special cases worth mentioning.
The
SUB
control's main purpose is to the cancel a control sequencethat is in progress, but it also needs to output an error character (a
reverse question mark) to the display.
The
DEL
control is typically filtered out, but when a 96-characterset is designated, it can sometimes be mapped to a printable glyph that
needs to be displayed.
Validation Steps Performed
I've manually tested that all the controls that are meant to be filtered
out are no longer being displayed.
I've also extended the existing
NUL
unit test to cover the full set ofcontrols characters that are supposed to be filtered.
Closes #10786