$hex = sprintf "%04X", $arg;
} elsif ($arg =~ /^(?:[Uu]\+|0[xX])?([[:xdigit:]]+)$/) {
# Below is the line that differs from the _getcode() source
- $hex = sprintf "%04X", hex $arg;
+ $hex = sprintf "%04X", hex $1;
} else {
carp("unexpected arg \"$arg\" to charnames::viacode()");
return;
$| = 1;
-plan(83);
+plan(85);
use charnames ':full';
ok(! defined charnames::viacode(0x110000));
ok(! grep { /you asked for U+110000/ } @WARN);
-is("NULL", charnames::viacode(0));
+is(charnames::viacode(0), "NULL");
+is(charnames::viacode("BE"), "VULGAR FRACTION THREE QUARTERS");
+is(charnames::viacode("U+00000000000FEED"), "ARABIC LETTER WAW ISOLATED FORM");
+
# ---- Alias extensions