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

Surrogate pair that produces a half-with character erroneously rendered as full with #10287

Closed
alabuzhev opened this issue May 30, 2021 · 3 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@alabuzhev
Copy link
Contributor

alabuzhev commented May 30, 2021

Windows Terminal version (or Windows build number)

Terminal Preview 1.8.1032.0; Windows 10.0.19041.985

Other Software

No response

Steps to reproduce

  • Download this text file: width_test.txt
  • Open Windows Terminal
  • Open a new Command Prompt tab (Ctrl+Shift+2)
  • chcp 65001
  • type <Insert path to your downloads folder here>\width_test.txt
  • Have a look at the results
  • Repeat the steps above in Windows Console.

Expected Behavior

The output should contain the following letters, enclosed in square brackets, with and without colour, aligned nicely in both cases:

A - U+0041, single wchar_t, half width
Щ - U+0449, single wchar_t, half width
- U+5B57, single wchar_t, full width
𠜎 - U+2070E, surrogate pair, full width
🄀 - U+1F100, surrogate pair, half width

Example (photoshopped):
image

Actual Behavior

Windows Terminal:

image

  • Without esc sequences the text looks good
  • With esc sequences the presence of a half width surrogate pair 🄀 (U+1F100) breaks the logic and shifts the rest of the text right, leaving a gap.

In Windows Console it's the same in both cases:

image

  • The with is wrong, but at least it's consistent and without gaps.

Same file in Notepad with the same font (Consolas):

image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 30, 2021
@DHowett
Copy link
Member

DHowett commented Jun 1, 2021

Thanks for the report! Yeah -- this isn't good. We're tracking handling surrogate pairs better in #8000.

Right now, each code unit is given its own column (oops) even when the glyph only requires one.

@DHowett
Copy link
Member

DHowett commented Jun 1, 2021

/dup #8000

@ghost
Copy link

ghost commented Jun 1, 2021

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jun 1, 2021
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 1, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants