diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-10-24 10:02:54 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-10-24 10:45:25 -0600 |
commit | 90249f0ae5df4271829a2e527b72534b8974ec80 (patch) | |
tree | 8eed0a4a772fa9b774ac56f68ab6b575cd0e8282 /lib/charnames.pm | |
parent | 2644e1b79e9da90a5f25c0c63fcbc5c65fb35c13 (diff) | |
download | perl-90249f0ae5df4271829a2e527b72534b8974ec80.tar.gz |
Make \N{unknown char} a syntax error
Previously, it was a warning with the REPLACEMENT CHARACTER substituted.
Unicode recommends that it be a syntax error, and any code that used
this had to be buggy since the REPLACEMENT CHARACTER has no other use in
Unicode.
Diffstat (limited to 'lib/charnames.pm')
-rw-r--r-- | lib/charnames.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/charnames.pm b/lib/charnames.pm index bef3e1a3e9..5c4ff3f8a8 100644 --- a/lib/charnames.pm +++ b/lib/charnames.pm @@ -1,7 +1,7 @@ package charnames; use strict; use warnings; -our $VERSION = '1.32'; +our $VERSION = '1.33'; use unicore::Name; # mktables-generated algorithmically-defined names use _charnames (); # The submodule for this where most of the work gets done @@ -214,8 +214,7 @@ L<charnames::string_vianame()|/charnames::string_vianame(I<name>)>. Since Unicode 6.0, it is deprecated to use C<BELL>. Instead use C<ALERT> (but C<BEL> will continue to work). -If the input name is unknown, C<\N{NAME}> raises a warning and -substitutes the Unicode REPLACEMENT CHARACTER (U+FFFD). +It is a syntax error to use C<\N{NAME}> where C<NAME> is unknown. For C<\N{NAME}>, it is a fatal error if C<use bytes> is in effect and the input name is that of a character that won't fit into a byte (i.e., whose @@ -338,8 +337,7 @@ L<script list, C<:short> option|/DESCRIPTION>, or L<custom aliases|/CUSTOM ALIASES> you may have defined. The only difference is that if the input name is unknown, C<string_vianame> -returns C<undef> instead of the REPLACEMENT CHARACTER and does not raise a -warning message. +returns C<undef> instead of it being a syntax error. =head1 charnames::vianame(I<name>) |