Repository navigation
Preserve supplementary characters when PMC processes backspace - #7621
Merged
donnie-msft merged 3 commits intoAug 21, 2026
Merged
Conversation
Treat a trailing UTF-16 surrogate pair as one character when Package Manager Console processes backspace, and add GB18030 supplementary-character coverage. Co-authored-by: Copilot <[email protected]> Copilot-Session: 7939797f-e35c-4ef3-8f8b-70e7881aad43
Contributor
Author
|
@donnie-msft I migrated the GB18030 Package Manager Console fix from the internal trusted mirror as requested. Could you please review when you have a chance? |
martinrrm
reviewed
Aug 6, 2026
Contributor
Author
|
@dotnet-policy-service agree company="Microsoft" |
Drive the Package Manager Console through its Read-Host key input path so the test verifies supplementary-character deletion in both the host buffer and console display. Co-authored-by: Copilot <[email protected]> Copilot-Session: 970af390-b689-4d4b-895c-6a1ae2ebe3e2
martinrrm
previously approved these changes
Aug 18, 2026
zivkan
previously approved these changes
Aug 19, 2026
donnie-msft
previously approved these changes
Aug 20, 2026
Contributor
|
I re-ran the Apex tests since the added test timed-out. |
zivkan
reviewed
Aug 20, 2026
donnie-msft
dismissed stale reviews from zivkan, martinrrm, and themself
via
August 21, 2026 05:26
44b48c5
zivkan
approved these changes
Aug 21, 2026
Contributor
|
Changed the Apex test to wait until the Package Manager Console is ready for each simulated keystroke. This prevents Enter from being dropped, so the test completes instead of timing out. Locally, the new Apex test passed for me. Let's see if it does in CI. |
Contributor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Bug
Fixes: NuGet/Home#15025
Description
Package Manager Console previously processed backspace one UTF-16 code unit at a time. For GB18030 supplementary characters represented by surrogate pairs, this could leave an unpaired surrogate in the console text or PowerShell input buffer.
This change removes a complete trailing surrogate pair in both buffers and adds an Apex regression test covering supplementary-plane GB18030 text in Package Manager Console.
PR Checklist