In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/479b791bf828f8d105b334fe04ff82a4adfedcd7?hp=7b850028ea35536a8baa505b46aa55a5a9599e0d>
- Log ----------------------------------------------------------------- commit 479b791bf828f8d105b334fe04ff82a4adfedcd7 Author: Karl Williamson <k...@cpan.org> Date: Tue Apr 3 11:30:16 2018 -0600 PATCH: [perl #131670] Document Wide char msg better ----------------------------------------------------------------------- Summary of changes: pod/perldiag.pod | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pod/perldiag.pod b/pod/perldiag.pod index a64157d3cd..607bfc5469 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -7612,14 +7612,21 @@ under L<perlsyn/Experimental Details on given and when>. =item Wide character in %s -(S utf8) Perl met a wide character (>255) when it wasn't expecting -one. This warning is by default on for I/O (like print). The easiest -way to quiet this warning is simply to add the C<:utf8> layer to the -output, e.g. C<binmode STDOUT, ':utf8'>. Another way to turn off the -warning is to add C<no warnings 'utf8';> but that is often closer to +(S utf8) Perl met a wide character (ordinal >255) when it wasn't +expecting one. This warning is by default on for I/O (like print). + +If this warning does come from I/O, the easiest +way to quiet it is simply to add the C<:utf8> layer, I<e.g.>, +S<C<binmode STDOUT, ':utf8'>>. Another way to turn off the warning is +to add S<C<no warnings 'utf8';>> but that is often closer to cheating. In general, you are supposed to explicitly mark the filehandle with an encoding, see L<open> and L<perlfunc/binmode>. +If the warning comes from other than I/O, this diagnostic probably +indicates that incorrect results are being obtained. You should examine +your code to determine how a wide character is getting to an operation +that doesn't handle them. + =item Wide character (U+%X) in %s (W locale) While in a single-byte locale (I<i.e.>, a non-UTF-8 -- Perl5 Master Repository