vim-patch:9.1.0101: upper-case of German sharp s should be U+1E9E (#27449)

Problem:  upper-case of ß should be U+1E9E (CAPITAL LETTER SHARP S)
          (fenuks)
Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (ß)
          to U+1E9E LATIN CAPITAL LETTER SHARP S (ẞ), update tests
          (glepnir)

This is part of Unicode 5.1.0 from April 2008, so should be fairly safe
to use now and since 2017 is part of the German standard orthography,
according to Wikipedia:
https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12

There is however one exception: UnicodeData.txt for U+00DF
LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER
SHARP S as its upper case version. Therefore, toupper() won't be able
to convert from lower sharp s to upper case sharp s (the other way
around however works, since U+00DF is considered the lower case
character of U+1E9E and therefore tolower() works correctly for the
upper case version).

fixes: vim/vim#5573
closes: vim/vim#14018

bd1232a1fa

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2024-02-13 07:38:12 +08:00
committed by GitHub
parent 86458dde0e
commit 4860cc5bdc
6 changed files with 61 additions and 21 deletions

View File

@@ -134,7 +134,7 @@ describe('Visual block mode', function()
end)
it('should make a selected part uppercase', function()
-- GUe must uppercase a whole word, also when ß changes to SS.
-- GUe must uppercase a whole word, also when ß changes to .
feed('Gothe youtußeuu end<ESC>Ypk0wgUe<CR>')
-- GUfx must uppercase until x, inclusive.
feed('O- youßtußexu -<ESC>0fogUfx<CR>')
@@ -150,13 +150,13 @@ describe('Visual block mode', function()
expect([[
the YOUTUSSEUU end
- yOUSSTUSSEXu -
THE YOUTUSSEUU END
111THE YOUTUSSEUU END
the YOUTUEUU end
- yOUẞTUẞEXu -
THE YOUTUEUU END
111THE YOUTUEUU END
BLAH DI
DOH DUT
222the yoUTUSSEUU END
222the yoUTUEUU END
333THE YOUTUßeuu end]])
end)