_charnames#
📦 min
_charnames - the Unicode character name table behind \N{NAME}, charnames::viacode, charnames::vianame and \p{name=...}.
use charnames ();
printf "%s | U+%04X | %s\n", charnames::viacode(0x263A),
charnames::vianame("GREEK SMALL LETTER ALPHA"),
"\N{LATIN SMALL LETTER E WITH ACUTE}" eq "\x{e9}" ? "same" : "differs";
# WHITE SMILING FACE | U+03B1 | same
Nothing uses _charnames directly: it is the internal half of charnames, loaded by the first \N{...} or charnames call. The names are those of Unicode 17.0.0, as in perl 5.44.
_charnames.pm 1.51 is upstream’s. Its one large input, unicore/Name.pl, is stored in the binary when pperl is built rather than read from disk at the first lookup, so it costs no parsing or file access.
Differences from upstream#
None in behaviour.