This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pod: Suggest to use strict UTF-8 encoding when dealing with external data
[perl5.git] / pod / perlfunc.pod
index 1e32cca..d4dc2df 100644 (file)
@@ -3763,8 +3763,8 @@ many elements these have.  For that, use C<scalar @array> and C<scalar keys
 Like all Perl character operations, L<C<length>|/length EXPR> normally
 deals in logical
 characters, not physical bytes.  For how many bytes a string encoded as
-UTF-8 would take up, use C<length(Encode::encode_utf8(EXPR))> (you'll have
-to C<use Encode> first).  See L<Encode> and L<perlunicode>.
+UTF-8 would take up, use C<length(Encode::encode('UTF-8', EXPR))>
+(you'll have to C<use Encode> first).  See L<Encode> and L<perlunicode>.
 
 =item __LINE__
 X<__LINE__>