Make encoding and charnames pragmas coexist.
[p5sagit/p5-mst-13.2.git] / lib / charnames.pm
index 787ecf9..70d6d17 100644 (file)
@@ -45,7 +45,7 @@ sub charnames {
     my $fname = substr $txt, $off[0] + 2, $off[1] - $off[0] - 2;
     die "Character 0x$hex with name '$fname' is above 0xFF";
   }
-  return chr $ord;
+  return pack "U", $ord;
 }
 
 sub import {