$ perl -Mcharnames=:full -E'say charnames::viacode(ord "A")'
LATIN CAPITAL LETTER A
是否有方便的方法从Perl中发现此名称的所有已知别名?
1 个答案:
答案 0 :(得分:4)
要获取代码点的Unicode别名,可以使用以下命令:
use Unicode::UCD qw( charprop );
my @aliases =
map { s/:.*//sr }
split /,/,
charprop($ucp, "Name_Alias"); # $ucp is the Unicode code point as a number.