1 package PerlIO::encoding;
5 $DEBUG and warn __PACKAGE__, " called by ", join(", ", caller), "\n";
8 # Equivalent of this is done in encoding.xs - do not uncomment.
13 XSLoader::load(__PACKAGE__, $VERSION);
16 Encode::PERLQQ()|Encode::WARN_ON_ERR()|Encode::STOP_AT_PARTIAL();
23 PerlIO::encoding - encoding layer
27 open($f, "<:encoding(foo)", "infoo");
28 open($f, ">:encoding(bar)", "outbar");
30 use Encode qw(:fallbacks);
31 $PerlIO::encoding::fallback = FB_PERLQQ;
35 Open a filehandle with a transparent encoding filter.
37 On input, convert the bytes expected to be in the specified
38 character set and encoding to Perl string data (Unicode and
39 Perl's internal Unicode encoding, UTF-8). On output, convert
40 Perl string data into the specified character set and encoding.
42 When the layer is pushed the current value of C<$PerlIO::encoding::fallback>
43 is saved and used as the check argument when calling the Encodings
48 L<open>, L<Encode>, L<perlfunc/binmode>, L<perluniintro>