{
    "mode": "perldoc",
    "parameter": "Encode::Unicode::UTF7",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Encode%3A%3AUnicode%3A%3AUTF7/json",
    "generated": "2026-06-15T14:42:53Z",
    "synopsis": "use Encode qw/encode decode/;\n$utf7 = encode(\"UTF-7\", $utf8);\n$utf8 = decode(\"UTF-7\", $ucs2);",
    "sections": {
        "NAME": {
            "content": "Encode::Unicode::UTF7 -- UTF-7 encoding\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Encode qw/encode decode/;\n$utf7 = encode(\"UTF-7\", $utf8);\n$utf8 = decode(\"UTF-7\", $ucs2);\n",
            "subsections": []
        },
        "ABSTRACT": {
            "content": "This module implements UTF-7 encoding documented in RFC 2152. UTF-7, as its name suggests, is a\n7-bit re-encoded version of UTF-16BE. It is designed to be MTA-safe and expected to be a\nstandard way to exchange Unicoded mails via mails. But with the advent of UTF-8 and 8-bit\ncompliant MTAs, UTF-7 is hardly ever used.\n\nUTF-7 was not supported by Encode until version 1.95 because of that. But Unicode::String, a\nmodule by Gisle Aas which adds Unicode supports to non-utf8-savvy perl did support UTF-7, the\nUTF-7 support was added so Encode can supersede Unicode::String 100%.\n",
            "subsections": []
        },
        "In Practice": {
            "content": "When you want to encode Unicode for mails and web pages, however, do not use UTF-7 unless you\nare sure your recipients and readers can handle it. Very few MUAs and WWW Browsers support these\ndays (only Mozilla seems to support one). For general cases, use UTF-8 for message body and\nMIME-Header for header instead.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Encode, Encode::Unicode, Unicode::String\n\nRFC 2781 <http://www.ietf.org/rfc/rfc2152.txt>\n",
            "subsections": []
        }
    },
    "summary": "Encode::Unicode::UTF7 -- UTF-7 encoding",
    "flags": [],
    "examples": [],
    "see_also": []
}