terminal icon indicating copy to clipboard operation
terminal copied to clipboard

conhost with raster fonts: chcp 65001 breaks rendering of box-drawing characters

Open lhecker opened this issue 1 year ago • 1 comments

Windows Terminal version

d3a18b9

Windows build number

No response

Other Software

No response

Steps to reproduce

  • Print box-drawing characters
  • chcp 65001 -> It worky :)
  • Ctrl+Scroll -> It no worky :(

Expected Behavior

This behavior is sus and I feel like this may not be a limitation in GDI. The ASCII characters all still work and the font doesn't actually change at all when you Ctrl+Scroll. LOGFONTW has a code-page field and we probably do something wrong there, or the .fon files have some weird logic that makes box-drawing glyphs code-page dependent. 🤔

In any case, we probably shouldn't treat 65001 as any old code page and instead use the CP_ACP instead.

Actual Behavior

image

image

lhecker avatar Feb 10 '24 21:02 lhecker

Weird... I can't reproduce this issue on my other machine that uses a public Windows build, even though I'm using the latest conhost from main.

lhecker avatar Feb 15 '24 17:02 lhecker

Image

Just tried this in the conhost straight off the current GE builds:

chcp 65001
type d:\dev\utf-8-test.txt

then ctrl+scroll, and it worked fine?

zadjii-msft avatar Mar 29 '24 11:03 zadjii-msft

It only happend with raster fonts. But I can't reproduce it anymore either so I'll close this.

lhecker avatar Mar 29 '24 14:03 lhecker