Capitalizing the German letter ß gives SS instead of ẞ
Describe the bug Capitalizing the German letter ß gives SS instead of ẞ.
To Reproduce Steps to reproduce the behavior:
- Type any text that contains ß. (For example, Gauß und Weierstraß.)
- Select the text.
- Press
gU. - Gauß und Weierstraß is converted to GAUSS UND WEIERSTRASS.
Expected behavior Since there is already the uppercase version of ß (https://glyphsapp.com/learn/localize-your-font-german-capital-sharp-s), I expect the result to be GAUẞ UND WEIERSTRAẞ.
Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

Environment (please complete the following information):
- Extension (VsCodeVim) version:
1.24.1 - VSCode version:
1.71.2 - OS:
Windows_NT x64 10.0.25211
Additional context Add any other context about the problem here.
Hmm... looks like in my locale, at least, 'ß'.toUpperCase() and 'ß'.toLocaleUpperCase() both return 'SS'. This could be a locale issue though (this stuff is definitely not my wheelhouse).
@septsea Can you please confirm whether the g~ (toggle case) command works correctly on your machine with 'ß'? I noticed gU and gu use the locale-agnostic methods while g~ uses the locale-sensitive methods.
The g~ command converts ß to SS. @J-Fields
Yeah, my testing suggests this is an issue with javascript's toLocaleUppercase (at least in common implementations) even with the German locale.
I did some experiments.
-
"Möbelträgerfüße".upper()in Python returnsMÖBELTRÄGERFÜSSE. -
"Möbelträgerfüße".toUpperCase()in Java returnsMÖBELTRÄGERFÜSSE. -
"Möbelträgerfüße".upcasein Ruby returnsMÖBELTRÄGERFÜSSE. -
"Möbelträgerfüße".uppercased()in Swift returnsMÖBELTRÄGERFÜSSE. -
"Möbelträgerfüße".to_uppercase()in Rust returnsMÖBELTRÄGERFÜSSE. -
"Möbelträgerfüße".ToUpper()in C# returnsMÖBELTRÄGERFÜßE(instead ofMÖBELTRÄGERFÜẞE). -
strings.ToUpper("Möbelträgerfüße")in Go returnsMÖBELTRÄGERFÜßE(instead ofMÖBELTRÄGERFÜẞE).
Well. ẞ was nonexistent or nonstandard when toUpperCase (or toLocaleUpperCase, or their counterparts in other programming languages) was created.
Last year I ran into a description somewhere that there was indeed such a problem with THAT German character. To me it was (and is) a problem because I am working on an application where that translation should return ONE character, not two ("ss").
And now in another application with a TabulaRecta things are going amiss thanks to THAT specific character.