Encode-Mime-Header

Encode::MIME::Header(3p) Perl Programmers Reference Guide

Encode-Mime-Header

Encode::MIME::Header(3p) Perl Programmers Reference Guide # Encode::MIME::Header(3p) Perl Programmers Reference Guide NNAAMMEE # Encode::MIME::Header -- MIME encoding for an unstructured email header SSYYNNOOPPSSIISS # use Encode qw(encode decode); my $mime_str = encode("MIME-Header", "Sample:Text \N{U+263A}"); # $mime_str is "=?UTF-8?B?U2FtcGxlOlRleHQg4pi6?=" my $mime_q_str = encode("MIME-Q", "Sample:Text \N{U+263A}"); # $mime_q_str is "=?UTF-8?Q?Sample=3AText_=E2=98=BA?=" my $str = decode("MIME-Header", "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=\r\n " . "=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=" ); # $str is "If you can read this you understand the example." use Encode qw(decode :fallbacks); use Encode::MIME::Header; local $Encode::MIME::Header::STRICT_DECODE = 1; my $strict_string = decode("MIME-Header", $mime_string, FB_CROAK); # use strict decoding and croak on errors AABBSSTTRRAACCTT # This module implements RFC 2047 <https://tools. ...