Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

PerlIO::encoding (3)

Name

PerlIO::encoding - encoding layer

Synopsis

use PerlIO::encoding;

open($f, "<:encoding(foo)", "infoo");
open($f, ">:encoding(bar)", "outbar");

use Encode qw(:fallbacks);
$PerlIO::encoding::fallback = FB_PERLQQ;

Description

Perl Programmers Reference Guide                           PerlIO::encoding(3)



NAME
       PerlIO::encoding - encoding layer

SYNOPSIS
         use PerlIO::encoding;

         open($f, "<:encoding(foo)", "infoo");
         open($f, ">:encoding(bar)", "outbar");

         use Encode qw(:fallbacks);
         $PerlIO::encoding::fallback = FB_PERLQQ;

DESCRIPTION
       This PerlIO layer opens a filehandle with a transparent encoding
       filter.

       On input, it converts the bytes expected to be in the specified
       character set and encoding to Perl string data (Unicode and Perl's
       internal Unicode encoding, UTF-8).  On output, it converts Perl string
       data into the specified character set and encoding.

       When the layer is pushed, the current value of
       $PerlIO::encoding::fallback is saved and used as the CHECK argument
       when calling the Encode methods encode() and decode().


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+-----------------------+
       |ATTRIBUTE TYPE |   ATTRIBUTE VALUE     |
       +---------------+-----------------------+
       |Availability   | runtime/perl-532      |
       +---------------+-----------------------+
       |Stability      | Pass-through volatile |
       +---------------+-----------------------+

SEE ALSO
       open, Encode, "binmode" in perlfunc, perluniintro



NOTES
       Source code for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This software was built from source available at
       https://github.com/oracle/solaris-userland.  The original community
       source was downloaded from
       http://www.cpan.org/src/5.0/perl-5.32.0.tar.gz.

       Further information about this software can be found on the open source
       community website at https://www.perl.org/.



perl v5.32.0                      2020-06-14               PerlIO::encoding(3)