1 use Unicode::Normalize qw( NFKD );
2 use Text::Unidecode qw( unidecode );
11 !defined $row[2] || $row[0] eq $row[2] ? 1 # identical
12 : $row[2] =~ /\A\p{Mn}+\z/ ? 8 # combining accent
13 : NFKD($row[2]) =~ $row[0] ? 2 # decomposed equivalent
14 : $row[2] =~ /^\p{Latin}/ ? 4 # latin script
15 : unidecode($row[2]) =~ /^\W*\Q$row[0]/ ? 5 # transliterated
24 $_->[0] => "$_->[1]<br>$_->[2]"
28 g1 => ['unaltered', "same results as without modifier"],
29 g2 => ['accented', "decomposes to the original letter with a combining accent"],
30 g4 => ['latin', "a different (accented) latin letter"],
31 g5 => ['similar', "transliterates (mostly) into the unmodified letter"],
32 g7 => ['other', "symbol not directly deducible from key"],
33 g8 => ['combining', "diacritical mark to be combined with a following character"],