-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Some Unicode characters like ß not working in terminal #19763
Comments
Hi @RobIsHere, some questions:
|
Of course. I hope this helps:
This is with 1.8.1. In 1.9.0 it was the same. (I cannot upgrade now for the screenshots because of the blocked terminal settings, sorry!) |
I think this is probably a duplicate of #19440, you use altgr to enter these characters right? |
No, Tryriar. The keys are without any modifiers. Just shift for Uppercase of ÖAÜ. You can see them here near the Null "0" Key and near the "L" on the right side: |
Thanks for clarifying 😃 |
This looks like the classic "UTF-8 interpreted as CP1252" bug. For example, Ä (U+00E4 LATIN SMALL LETTER A WITH DIAERESIS), encoded in UTF-8, is the two-byte sequence 0xC3 0xA4. If that byte sequence is interpreted as CP1252, it will show up as à (U+00C3 LATIN CAPITAL LETTER A WITH TILDE) followed by ¤ (U+00A4 CURRENCY SIGN). I would bet that Powershell is using the current Windows codepage for its input, instead of UTF-8. @RobIsHere, what happens if you run |
BTW, any time you see  (U+00C2) or à (U+00C3) followed by other accented characters, the first thing you should think is "UTF-8 wrongly interpreted as Latin-1 / ISO-8859-1 / CP-1252". 99% of the time,  and à are dead giveaways for that particular, far-too-widespread, bug. (I'll spare you the rant on why Microsoft should really have made CP65001 the default in Windows 10.) |
@rmunn Because programs written in 1990s will crash. Cherish your life, stay away from C++. |
pps. Default encoding (codepage) of console in English language is cp437. |
In this scenario ß works as expected. ´´´ ´´´ |
Are you using WSL bash or Cygwin bash? I don't have a German keyboard, so I tried copying and pasting U+00DF (ß) into a VSCode terminal pane, and it worked. FWIW, I know that winpty doesn't handle "special characters" the same way as the normal console. AFAICT, if a key isn't on my keyboard, it's not possible for me to type it into WSL bash using the normal console. If I try to paste it, nothing happens. Here's my first attempt with VSCode:
I belive winpty decodes UTF-8 from VSCode and then calls |
Duplicate #19665 |
Steps to Reproduce:
The cursor jumps 4 places forward when typing ß in bash.exe called via powershell and reverting the mess with backspace is somehow out of sync. It only deletes two and then it thinks it is at the prompt. But it isn't yet.
The text was updated successfully, but these errors were encountered: