1
0
forked from aniani/vim

patch 9.1.0101: upper-case of German sharp s should be U+1E9E

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: #5573
closes: #14018

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
glepnir
2024-02-12 22:14:53 +01:00
committed by Christian Brabandt
parent f2d90a3511
commit bd1232a1fa
6 changed files with 56 additions and 16 deletions

View File

@@ -3454,6 +3454,8 @@ static convertStruct toLower[] =
{0x1e900,0x1e921,1,34}
};
// Note: UnicodeData.txt does not define U+1E9E as being the corresponding upper
// case letter for U+00DF (ß), however it is part of the toLower table
static convertStruct toUpper[] =
{
{0x61,0x7a,1,-32},