Unicode composition characters break rendering #21405

Closed
opened 2026-01-31 07:43:41 +00:00 by claunia · 5 comments
Owner

Originally created by @hvesalai on GitHub (Mar 17, 2024).

Windows Terminal version

1.19.10573.0

Windows build number

10.0.22631.3296

Other Software

Ubuntu 22.04, bash 5.1.16(1), less 590, emacs 29.2, emacs 27.1

Steps to reproduce

  1. Start Ubuntu 22.04 bash, resize window to 20 x 80
  2. Create a file /tmp/test.txt with the following 5 rows (use, for example, cat > /tmp/test.txt, and paste the lines in)
// 1
// 2
// 3 "ɜ,ʴ,s,n,j,eɪ̯,t,aɪ̯,u,f,θ,ʊ,ɑ,m,i,ɹ,ɪ,-,v,æ,b,g,ð,l,aʊ̯,ɔɪ̯,ʒ,p,ˈ,ɜʴ,d͡ʒ,ŋ,ʃ,h,t͡ʃ,oʊ̯,ʌ,w,ˌ,ɛ,k,ɔ,z,d,sʷ,tʷ,θʷ,gʷ,ðʷ,ʒʷ,d͡ʒʷ,ʃʷ,hʷ,t͡ʃʷ,kʷ,zʷ,dʷ,kʰ,pʰ,tʰ"
// 4
// 5
  1. Run less --chop-long-lines /tmp/test.txt, which should chop any line that doesn't fit the window (instead of wrapping them)
  2. Resize the window horizontally to various widths, so that the longest line containing the IPA symbols doesn't fit the window
  3. Observe line 1
  4. Observe line 3

Expected Behavior

  • All lines are shown all the time
  • Line 3 is cut and no part of it wraps

Actual Behavior

  • One line (usually line 1 or 2) disappears
  • Line 3 is partially wrapped, the amount of characters on the wrapped line is proportional to the amount of visible unicode composition characters
Originally created by @hvesalai on GitHub (Mar 17, 2024). ### Windows Terminal version 1.19.10573.0 ### Windows build number 10.0.22631.3296 ### Other Software Ubuntu 22.04, bash 5.1.16(1), less 590, emacs 29.2, emacs 27.1 ### Steps to reproduce 1. Start Ubuntu 22.04 bash, resize window to 20 x 80 2. Create a file `/tmp/test.txt` with the following 5 rows (use, for example, `cat > /tmp/test.txt`, and paste the lines in) ``` // 1 // 2 // 3 "ɜ,ʴ,s,n,j,eɪ̯,t,aɪ̯,u,f,θ,ʊ,ɑ,m,i,ɹ,ɪ,-,v,æ,b,g,ð,l,aʊ̯,ɔɪ̯,ʒ,p,ˈ,ɜʴ,d͡ʒ,ŋ,ʃ,h,t͡ʃ,oʊ̯,ʌ,w,ˌ,ɛ,k,ɔ,z,d,sʷ,tʷ,θʷ,gʷ,ðʷ,ʒʷ,d͡ʒʷ,ʃʷ,hʷ,t͡ʃʷ,kʷ,zʷ,dʷ,kʰ,pʰ,tʰ" // 4 // 5 ``` 3. Run `less --chop-long-lines /tmp/test.txt`, which should chop any line that doesn't fit the window (instead of wrapping them) 4. Resize the window horizontally to various widths, so that the longest line containing the IPA symbols doesn't fit the window 5. Observe line 1 6. Observe line 3 ### Expected Behavior - All lines are shown all the time - Line 3 is cut and no part of it wraps ### Actual Behavior - One line (usually line 1 or 2) disappears - Line 3 is partially wrapped, the amount of characters on the wrapped line is proportional to the amount of visible unicode composition characters
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:43:41 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 17, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (Mar 17, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Closed similar issues: - [Unicode characters not rendering correctly (#6136)](https://github.com/microsoft/terminal/issues/6136), similarity score: 0.77 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@hvesalai commented on GitHub (Mar 17, 2024):

I can repeat the same issue in also emacs, but vi works correctly with :set nowrap

@hvesalai commented on GitHub (Mar 17, 2024): I can repeat the same issue in also `emacs`, but `vi` works correctly with `:set nowrap`
Author
Owner

@hvesalai commented on GitHub (Mar 18, 2024):

Just to visualize the difference between actual and expected, here is how it looks in Windows Terminal compared to pytty. Both terminals are originally 80x10 and then resized down to 60x10 to make less redraw the screen.

Also note how neither terminal does the composition characters correctly (Putty has them more correc than Windows Terminal), but yet only one of them has the rendering problems reported here.

Before resize

Windows Terminal:

kuva

Putty:

kuva

After resize

Windows Terminal (note missing first line):

kuva

Putty:

kuva

@hvesalai commented on GitHub (Mar 18, 2024): Just to visualize the difference between actual and expected, here is how it looks in **Windows Terminal** compared to **pytty**. Both terminals are originally 80x10 and then resized down to 60x10 to make `less` redraw the screen. Also note how neither terminal does the composition characters correctly (Putty has them more correc than Windows Terminal), but yet only one of them has the rendering problems reported here. ### Before resize **Windows Terminal:** ![kuva](https://github.com/microsoft/terminal/assets/861035/5dc9c806-4932-42d9-b40c-0664b9e2c21f) **Putty:** ![kuva](https://github.com/microsoft/terminal/assets/861035/f6ca61de-7d2c-4140-a5f7-a74e3b1f8898) ### After resize **Windows Terminal (note missing first line):** ![kuva](https://github.com/microsoft/terminal/assets/861035/8ca3c134-e488-47e1-a0b9-d1f2155ca21a) **Putty:** ![kuva](https://github.com/microsoft/terminal/assets/861035/16a83983-8c2c-410f-8d55-4cf615e70833)
Author
Owner

@lhecker commented on GitHub (Mar 18, 2024):

The reason it occurs is because Windows Terminal didn't even support full UTF-16 until fairly recently and it still doesn't support combining marks or other zero width characters until today.
The good news is that this is planned to be addressed in the next release (version 1.21). If you're interested in updates about this, please subscribe to #1472. The issue will be updated once my PRs have merged. 🙂

/dup #1472

@lhecker commented on GitHub (Mar 18, 2024): The reason it occurs is because Windows Terminal didn't even support full UTF-16 until fairly recently and it still doesn't support combining marks or other zero width characters until today. The good news is that this is planned to be addressed in the next release (version 1.21). If you're interested in updates about this, please subscribe to #1472. The issue will be updated once my PRs have merged. 🙂 /dup #1472
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 18, 2024):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 18, 2024): 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! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21405