{
    "content": [
        {
            "type": "text",
            "text": "# MIME::QuotedPrint (perldoc)\n\n**Summary:** MIME::QuotedPrint - Encoding and decoding of quoted-printable strings\n\n**Synopsis:** use MIME::QuotedPrint;\n$encoded = encodeqp($decoded);\n$decoded = decodeqp($encoded);\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (5 lines)\n- **DESCRIPTION** (9 lines) — 4 subsections\n  - encode_qp (1 lines)\n  - encode_qp (1 lines)\n  - encode_qp (18 lines)\n  - decode_qp (19 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (2 lines)\n\n## Full Content\n\n### NAME\n\nMIME::QuotedPrint - Encoding and decoding of quoted-printable strings\n\n### SYNOPSIS\n\nuse MIME::QuotedPrint;\n\n$encoded = encodeqp($decoded);\n$decoded = decodeqp($encoded);\n\n### DESCRIPTION\n\nThis module provides functions to encode and decode strings into and from the quoted-printable\nencoding specified in RFC 2045 - *MIME (Multipurpose Internet Mail Extensions)*. The\nquoted-printable encoding is intended to represent data that largely consists of bytes that\ncorrespond to printable characters in the ASCII character set. Each non-printable character (as\ndefined by English Americans) is represented by a triplet consisting of the character \"=\"\nfollowed by two hexadecimal digits.\n\nThe following functions are provided:\n\n#### encode_qp\n\n#### encode_qp\n\n#### encode_qp\n\nThis function returns an encoded version of the string ($str) given as argument.\n\nThe second argument ($eol) is the line-ending sequence to use. It is optional and defaults\nto \"\\n\". Every occurrence of \"\\n\" is replaced with this string, and it is also used for\nadditional \"soft line breaks\" to ensure that no line end up longer than 76 characters. Pass\nit as \"\\015\\012\" to produce data suitable for external consumption. The string \"\\r\\n\"\nproduces the same result on many platforms, but not all.\n\nThe third argument ($binmode) will select binary mode if passed as a TRUE value. In binary\nmode \"\\n\" will be encoded in the same way as any other non-printable character. This ensures\nthat a decoder will end up with exactly the same string whatever line ending sequence it\nuses. In general it is preferable to use the base64 encoding for binary data; see\nMIME::Base64.\n\nAn $eol of \"\" (the empty string) is special. In this case, no \"soft line breaks\" are\nintroduced and binary mode is effectively enabled so that any \"\\n\" in the original data is\nencoded as well.\n\n#### decode_qp\n\nThis function returns the plain text version of the string given as argument. The lines of\nthe result are \"\\n\" terminated, even if the $str argument contains \"\\r\\n\" terminated lines.\n\nIf you prefer not to import these routines into your namespace, you can call them as:\n\nuse MIME::QuotedPrint ();\n$encoded = MIME::QuotedPrint::encode($decoded);\n$decoded = MIME::QuotedPrint::decode($encoded);\n\nPerl v5.8 and better allow extended Unicode characters in strings. Such strings cannot be\nencoded directly, as the quoted-printable encoding is only defined for single-byte characters.\nThe solution is to use the Encode module to select the byte encoding you want. For example:\n\nuse MIME::QuotedPrint qw(encodeqp);\nuse Encode qw(encode);\n\n$encoded = encodeqp(encode(\"UTF-8\", \"\\x{FFFF}\\n\"));\nprint $encoded;\n\n### COPYRIGHT\n\nCopyright 1995-1997,2002-2004 Gisle Aas.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\n### SEE ALSO\n\nMIME::Base64\n\n"
        }
    ],
    "structuredContent": {
        "command": "MIME::QuotedPrint",
        "section": "",
        "mode": "perldoc",
        "summary": "MIME::QuotedPrint - Encoding and decoding of quoted-printable strings",
        "synopsis": "use MIME::QuotedPrint;\n$encoded = encodeqp($decoded);\n$decoded = decodeqp($encoded);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": [
                    {
                        "name": "encode_qp",
                        "lines": 1
                    },
                    {
                        "name": "encode_qp",
                        "lines": 1
                    },
                    {
                        "name": "encode_qp",
                        "lines": 18
                    },
                    {
                        "name": "decode_qp",
                        "lines": 19
                    }
                ]
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "MIME::QuotedPrint - Encoding and decoding of quoted-printable strings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use MIME::QuotedPrint;\n\n$encoded = encodeqp($decoded);\n$decoded = decodeqp($encoded);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module provides functions to encode and decode strings into and from the quoted-printable\nencoding specified in RFC 2045 - *MIME (Multipurpose Internet Mail Extensions)*. The\nquoted-printable encoding is intended to represent data that largely consists of bytes that\ncorrespond to printable characters in the ASCII character set. Each non-printable character (as\ndefined by English Americans) is represented by a triplet consisting of the character \"=\"\nfollowed by two hexadecimal digits.\n\nThe following functions are provided:\n",
                "subsections": [
                    {
                        "name": "encode_qp",
                        "content": ""
                    },
                    {
                        "name": "encode_qp",
                        "content": ""
                    },
                    {
                        "name": "encode_qp",
                        "content": "This function returns an encoded version of the string ($str) given as argument.\n\nThe second argument ($eol) is the line-ending sequence to use. It is optional and defaults\nto \"\\n\". Every occurrence of \"\\n\" is replaced with this string, and it is also used for\nadditional \"soft line breaks\" to ensure that no line end up longer than 76 characters. Pass\nit as \"\\015\\012\" to produce data suitable for external consumption. The string \"\\r\\n\"\nproduces the same result on many platforms, but not all.\n\nThe third argument ($binmode) will select binary mode if passed as a TRUE value. In binary\nmode \"\\n\" will be encoded in the same way as any other non-printable character. This ensures\nthat a decoder will end up with exactly the same string whatever line ending sequence it\nuses. In general it is preferable to use the base64 encoding for binary data; see\nMIME::Base64.\n\nAn $eol of \"\" (the empty string) is special. In this case, no \"soft line breaks\" are\nintroduced and binary mode is effectively enabled so that any \"\\n\" in the original data is\nencoded as well.\n"
                    },
                    {
                        "name": "decode_qp",
                        "content": "This function returns the plain text version of the string given as argument. The lines of\nthe result are \"\\n\" terminated, even if the $str argument contains \"\\r\\n\" terminated lines.\n\nIf you prefer not to import these routines into your namespace, you can call them as:\n\nuse MIME::QuotedPrint ();\n$encoded = MIME::QuotedPrint::encode($decoded);\n$decoded = MIME::QuotedPrint::decode($encoded);\n\nPerl v5.8 and better allow extended Unicode characters in strings. Such strings cannot be\nencoded directly, as the quoted-printable encoding is only defined for single-byte characters.\nThe solution is to use the Encode module to select the byte encoding you want. For example:\n\nuse MIME::QuotedPrint qw(encodeqp);\nuse Encode qw(encode);\n\n$encoded = encodeqp(encode(\"UTF-8\", \"\\x{FFFF}\\n\"));\nprint $encoded;\n"
                    }
                ]
            },
            "COPYRIGHT": {
                "content": "Copyright 1995-1997,2002-2004 Gisle Aas.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "MIME::Base64\n",
                "subsections": []
            }
        }
    }
}