{
    "mode": "perldoc",
    "parameter": "PerlIO::encoding",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/PerlIO%3A%3Aencoding/json",
    "generated": "2026-06-10T16:25:18Z",
    "synopsis": "use PerlIO::encoding;\nopen($f, \"<:encoding(foo)\", \"infoo\");\nopen($f, \">:encoding(bar)\", \"outbar\");\nuse Encode qw(:fallbacks);\n$PerlIO::encoding::fallback = FBPERLQQ;",
    "sections": {
        "NAME": {
            "content": "PerlIO::encoding - encoding layer\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use PerlIO::encoding;\n\nopen($f, \"<:encoding(foo)\", \"infoo\");\nopen($f, \">:encoding(bar)\", \"outbar\");\n\nuse Encode qw(:fallbacks);\n$PerlIO::encoding::fallback = FBPERLQQ;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This PerlIO layer opens a filehandle with a transparent encoding filter.\n\nOn input, it converts the bytes expected to be in the specified character set and encoding to\nPerl string data (Unicode and Perl's internal Unicode encoding, UTF-8). On output, it converts\nPerl string data into the specified character set and encoding.\n\nWhen the layer is pushed, the current value of $PerlIO::encoding::fallback is saved and used as\nthe CHECK argument when calling the Encode methods encode() and decode().\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "open, Encode, \"binmode\" in perlfunc, perluniintro\n",
            "subsections": []
        }
    },
    "summary": "PerlIO::encoding - encoding layer",
    "flags": [],
    "examples": [],
    "see_also": []
}