charnames: Check for malformed utf8
authorKarl Williamson <public@khwilliamson.com>
Wed, 15 Jun 2011 18:09:55 +0000 (12:09 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 16 Jun 2011 00:29:01 +0000 (18:29 -0600)
     The new warnings categories in 5.14 allow for turning off warnings
     for everything but malformed utf8; instead of all or nothing.
     Allow malformed warnings.

lib/charnames.pm

index 95bbc73..5cda64c 100644 (file)
@@ -468,7 +468,7 @@ sub alias (@) # Set up a single alias
       $value = CORE::hex $1;
     }
     if ($value =~ $decimal_qr) {
-        no warnings 'utf8'; # Allow even illegal characters
+        no warnings qw(non_unicode surrogate nonchar); # Allow any non-malformed
         $^H{charnames_ord_aliases}{$name} = pack("U", $value);
 
         # Use a canonical form.