Conhost fills two cells for single-width glyph (unicode \u23CE ⏎ character before each prompt in fish in WSL) #214

Open
opened 2026-01-30 21:45:59 +00:00 by claunia · 0 comments
Owner

Originally created by @Maximus5 on GitHub (Apr 12, 2018).

  • Windows build number: Chinese build 10.0.16299.15
  • Problem: unicode \u23CE ⏎ character preceding every prompt in fish in WSL
  • Reason: the single-width glyph occupies two cells but only in CJK Windows builds
  • Originally reported here: https://github.com/Maximus5/ConEmu/issues/1402
max@MAXP:~$ fish
Welcome to fish, the friendly interactive shell
⏎
max@MAXP ~>
⏎
max@MAXP ~>

Screenshot

Conhost internal breaking changes

The problem is that on CJK Windows versions conhost still behaves differently than on European versions.
Especially in that case, when fish outputs the ⏎ (U+23CE) conhost advances the cursor by two cells on CJK Windows 10 (I'm trying Chinese build 10.0.16299.15), but on European version the cursor is advanced by only one cell as expected!

Conhost fills two cells with single-width glyph. Yeah, it sets the COMMON_LVB_LEADING_BYTE and COMMON_LVB_TRAILING_BYTE flags in these two cells, but terminal app (fish) expects that it output only one character and things are broken.

From my tests, a lot of glyphs are treated improperly as double-cell characters on CJK windows (at least all Russian and Greek letters).

Repro steps

  • Fresh installation of Chinese Windows 10.0.16299.15
  • Installed Developer Mode, Windows Subsystem for Linux and Ubuntu (from store)
  • Started Ubuntu, successfully downloaded, got to bash prompt
  • Installed latest version of fish in Ubuntu console
sudo apt-add-repository ppa:fish-shell/release-2
sudo apt-get update
sudo apt-get install fish
  • Started fish from bash prompt.
Originally created by @Maximus5 on GitHub (Apr 12, 2018). * Windows build number: **Chinese** build 10.0.16299.15 * Problem: unicode \u23CE ⏎ character preceding every prompt in fish in WSL * Reason: the single-width glyph occupies two cells but only in CJK Windows builds * Originally reported here: https://github.com/Maximus5/ConEmu/issues/1402 ``` max@MAXP:~$ fish Welcome to fish, the friendly interactive shell ⏎ max@MAXP ~> ⏎ max@MAXP ~> ``` [Screenshot](https://user-images.githubusercontent.com/1222388/38550703-e84822d0-3cbf-11e8-92ef-6e9df432b309.png) ### Conhost internal breaking changes The problem is that on CJK Windows versions conhost still behaves differently than on European versions. Especially in that case, when fish outputs the ⏎ (U+23CE) conhost advances the cursor by two cells on CJK Windows 10 (I'm trying Chinese build 10.0.16299.15), but on European version the cursor is advanced by only one cell as expected! Conhost fills two cells with single-width glyph. Yeah, it sets the COMMON_LVB_LEADING_BYTE and COMMON_LVB_TRAILING_BYTE flags in these two cells, but terminal app (fish) expects that it output only one character and things are broken. From my tests, a lot of glyphs are treated improperly as double-cell characters on CJK windows (at least all Russian and Greek letters). ### Repro steps * Fresh installation of Chinese Windows 10.0.16299.15 * Installed Developer Mode, Windows Subsystem for Linux and Ubuntu (from store) * Started Ubuntu, successfully downloaded, got to bash prompt * Installed [latest version of fish](https://launchpad.net/~fish-shell/+archive/ubuntu/release-2) in Ubuntu console ``` sudo apt-add-repository ppa:fish-shell/release-2 sudo apt-get update sudo apt-get install fish ``` * Started `fish` from bash prompt.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#214