1 package PerlIO::encoding;
5 $DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";
8 # Now these are all done in encoding.xs DO NOT COMMENT'em out!
10 # use Encode qw(:fallbacks);
14 XSLoader::load(__PACKAGE__, $VERSION);
21 PerlIO::encoding - encoding layer
25 open($f, "<:encoding(foo)", "infoo");
26 open($f, ">:encoding(bar)", "outbar");
28 use Encode qw(:fallbacks);
29 $PerlIO::encoding::check = FB_PERLQQ;
33 Open a filehandle with a transparent encoding filter.
35 On input, convert the bytes expected to be in the specified
36 character set and encoding to Perl string data (Unicode and
37 Perl's internal Unicode encoding, UTF-8). On output, convert
38 Perl string data into the specified character set and encoding.
40 When the layer is pushed the current value of C<$PerlIO::encoding::check>
41 is saved and used as the check argument when calling the Encodings
46 L<open>, L<Encode>, L<perlfunc/binmode>, L<perluniintro>