summaryrefslogtreecommitdiff
path: root/lib/charnames.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-05-28 13:32:46 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-05-28 13:32:46 +0000
commit00d835f2e04ba49347fca7d3b138f4c76991dcc3 (patch)
treed2da16e8040bef2b98575d9c8b7590dcc1a0489e /lib/charnames.pm
parenteb6a2339ad9f670cbbb568923067c047241c85f0 (diff)
downloadperl-00d835f2e04ba49347fca7d3b138f4c76991dcc3.tar.gz
More charnames tweaks.
p4raw-id: //depot/perl@16835
Diffstat (limited to 'lib/charnames.pm')
-rw-r--r--lib/charnames.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/charnames.pm b/lib/charnames.pm
index d826cb3e40..a540d14f7f 100644
--- a/lib/charnames.pm
+++ b/lib/charnames.pm
@@ -203,7 +203,7 @@ sub viacode
}
if ($code > 0x10FFFF) {
- carp "Unicode characters only allocated up to 0x10FFFF (you asked for $hex)";
+ carp sprintf "Unicode characters only allocated up to U+10FFFF (you asked for U+%X)", $hex;
return;
}
@@ -415,8 +415,12 @@ will also give a warning about being deprecated.
=head1 ILLEGAL CHARACTERS
-If you ask for a character that does not exist, a warning is given
-and the Unicode I<replacement character> "\x{FFFD}" is returned.
+If you ask by name for a character that does not exist, a warning is
+given and the Unicode I<replacement character> "\x{FFFD}" is returned.
+
+If you ask by code for a character that does not exist, no warning is
+given and C<undef> is returned. (Though if you ask for a code point
+past U+10FFFF you do get a warning.)
=head1 BUGS