microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.96k stars 8.35k forks source link

Curly quotes randomly become straight quotes #10484

Open sboukortt opened 3 years ago

sboukortt commented 3 years ago

Windows Terminal version (or Windows build number)

Windows 10.0.19042.0, Windows Terminal 1.8.1521.0

Other Software

msys2, up to date as of 22 June 2021

Happens in at least bash, fish and vim, but apparently not cat or python. Also does not happen with msys2’s default console emulator.

The keyboard layout is bépo 1.0.3.40.

Steps to reproduce

In an msys2 session ("commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -msys") in Windows Terminal with the bépo layout, repeatedly press either of these combinations:

Expected Behavior

A string of curly characters is inserted depending on the combination that was chosen:

Actual Behavior

Some of the characters are randomly straight.

lhecker commented 3 years ago

Does this happen with any other keyboard layout? Does it also happen outside of MSYS2?

sboukortt commented 3 years ago

It also happens with US International (AltGr + 9 or 0 for ‘ or ’), however it doesn’t occur in cmd.exe, PowerShell or WSL. (In PowerShell, nothing is output at all, but that is also the case with the default terminal emulator.)

lhecker commented 3 years ago

I cannot replicate the issue you have. I've enabled the US International keyboard layout and both AltGr+9 and AltGr+0 work flawless in cmd.exe and WT 1.8.1521.0. They print and respectively without any issues.

I'm testing this on the current Windows 11 dev version.

sboukortt commented 3 years ago

Yes, cmd.exe is unaffected unlike MSYS2.

lhecker commented 3 years ago

Oh sorry I misunderstood what you meant with "however it doesn't occur in".

sboukortt commented 3 years ago

No worries, thanks for looking into it.

In case it gives more information on what the problem could be: after enabling the experimental UTF-8 support system-wide, instead of straight quotes, what ’ turns into is ���. (Still randomly, not always.) Moreover, other characters like “é” are now also affected (that one becomes just ��). The number of � seems to be the number of UTF-8 code units that constitute the character although I am not really sure.