mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Add LATIN SMALL LETTER L
confusable
This makes `LATIN SMALL LETTER L` confusable with `LATIN SMALL LETTER I` because `CYRILLIC SMALL LETTER PALOCHKA` "ӏ" (mapping to i) wasn't confusable with `LATIN SMALL LETTER L` "l" (mapping to l) before. Also add tests for `str_utf8_comp_confusable`.
This commit is contained in:
parent
5be3e1ca84
commit
6d88a29910
|
@ -56,6 +56,7 @@ def generate_decompositions():
|
|||
# Z: Space
|
||||
ignore = category("C") | category("M") | category("Z")
|
||||
|
||||
con[0x006C] = [0x0069] # LATIN SMALL LETTER L -> LATIN SMALL LETTER I
|
||||
con[0x2800] = [] # BRAILLE PATTERN BLANK
|
||||
con[0xFFFC] = [] # OBJECT REPLACEMENT CHARACTER
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -45,3 +45,12 @@ TEST(Str, Utf8TrimRight)
|
|||
char A3[] = "abc "; str_utf8_trim_right(A3); EXPECT_STREQ(A3, "abc");
|
||||
char A4[] = "abc \xe2\x80\x8b"; str_utf8_trim_right(A4); EXPECT_STREQ(A4, "abc");
|
||||
}
|
||||
|
||||
TEST(Str, Utf8CompConfusables)
|
||||
{
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("abc", "abc") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("rn", "m") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("l", "ӏ") == 0); // CYRILLIC SMALL LETTER PALOCHKA
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("o", "x") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("aceiou", "ąçęįǫų") == 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue