This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
charnames.pm: return ord not chr
authorKarl Williamson <khw@khw-desktop.(none)>
Wed, 7 Jul 2010 18:55:33 +0000 (12:55 -0600)
committerKarl Williamson <khw@khw-desktop.(none)>
Tue, 13 Jul 2010 23:07:12 +0000 (17:07 -0600)
An error leg in charnames.pm was returning the wrong type.  This fixes
it.  A later commit will change the .t to add "use warnings" so this fix
will be noticed.

lib/charnames.pm

index 96552d0..3bd9d22 100644 (file)
@@ -543,7 +543,7 @@ sub lookup_name {
     unless (@off) {
       return if $runtime;
       carp "Unknown charname '$name'";
-      return "\x{FFFD}";
+      return 0xFFFD;
     }
 
     ##