New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Recommend :encoding(utf8) instead of :utf8 in perlunicode.pod #10804
Comments
From @ntyniReading input with the :utf8 layer can be unsafe, as discussed in Noticed by Vincent Lefevre in http://bugs.debian.org/589730 pod/perlunicode.pod | 6 +++++- Inline Patchdiff --git a/pod/perlunicode.pod b/pod/perlunicode.pod
index b9a43c3..4b25c27 100644
--- a/pod/perlunicode.pod
+++ b/pod/perlunicode.pod
@@ -23,10 +23,14 @@ Read L<Unicode Security Considerations|http://www.unicode.org/reports/tr36>.
Perl knows when a filehandle uses Perl's internal Unicode encodings
(UTF-8, or UTF-EBCDIC if in EBCDIC) if the filehandle is opened with
-the ":utf8" layer. Other encodings can be converted to Perl's
+the ":utf8" layer. UTF-8 and other encodings can be converted to Perl's
encoding on input or from Perl's encoding on output by use of the
":encoding(...)" layer. See L<open>.
+Note that the C<:utf8> layer does not validate byte sequences. For
+reading input, using C<:encoding(utf8)> instead of bare C<:utf8>, is
+strongly recommended.
+
To indicate that Perl source itself is in UTF-8, use C<use utf8;>.
=item Regular Expressions
--
1.7.2.3 |
From @jmdhOn Sun Nov 07 11:24:51 2010, ntyni@debian.org wrote:
A similar change which resolves this issue was applied in |
The RT System itself - Status changed from 'new' to 'open' |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#78906 (status was 'resolved')
Searchable as RT78906$
The text was updated successfully, but these errors were encountered: