From: Tels Date: Fri, 2 Mar 2007 11:31:39 +0000 (+0000) Subject: Doc patch about PerlIO::encoding: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6902c96abfac199dee031c2d64ebdf840b87fa4d;p=p5sagit%2Fp5-mst-13.2.git Doc patch about PerlIO::encoding: Subject: [PATCH] Re: 'Unknown PerlIO layer "encoding"...' message Message-Id: <200703021131.41085@bloodgate.com> p4raw-id: //depot/perl@30484 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 67e8c1e..3e2c57a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -542,7 +542,10 @@ functionality has moved from "discipline" to "layer". All documentation of this version of Perl therefore refers to "layers" rather than to "disciplines". Now back to the regularly scheduled documentation...> -To mark FILEHANDLE as UTF-8, use C<:utf8>. +To mark FILEHANDLE as UTF-8, use C<:utf8> or C<:encoding(utf8)>. +C<:utf8> just marks the data as UTF-8 without further checking, +while C<:encoding(utf8)> checks the data for actually being valid +UTF-8. More details can be found in L. In general, binmode() should be called after open() but before any I/O is done on the filehandle. Calling binmode() will normally flush any