X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FEncode%2Fencoding.pm;h=1f418e3a223d73442c959517d174c3dae19954c3;hb=20e98b0f9ccd1237d697ca82b2dc40058ff7f30b;hp=eb84e481f1129d0d97ebc72d9de5ac62285035a6;hpb=656ebd29b326e7cb4e9181b77b10fccb1c1df3c6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Encode/encoding.pm b/ext/Encode/encoding.pm index eb84e48..1f418e3 100644 --- a/ext/Encode/encoding.pm +++ b/ext/Encode/encoding.pm @@ -307,6 +307,14 @@ Will print C<2>, because C<$string> is upgraded as UTF-8. Without C, it will print C<4> instead, since C<$string> is three octets when interpreted as Latin-1. +=head2 Side effects + +If the C pragma is in scope then the lengths returned are +calculated from the length of C<$/> in Unicode characters, which is not +always the same as the length of C<$/> in the native encoding. + +This pragma affects utf8::upgrade, but not utf8::downgrade. + =head1 FEATURES THAT REQUIRE 5.8.1 Some of the features offered by this pragma requires perl 5.8.1. Most