Encode:...ncWords(3)
π NAME π
okay bestie, welcome to the User Contributed Perl Documentation page for Encode::MIME::EncWords(3) β yes, the manual-page energy is real β¨. This is Encode::MIME::EncWords -- MIME 'B' and 'Q' header encoding (alternative). That's the whole vibe: MIME header encoding, but the alternative flavor π
.
π SYNOPSIS π
Here's the group-chat screenshot of how you actually use it:
use Encode::MIME::EncWords;
use Encode qw/encode decode/;
# decode header:
$utf8 = decode('MIME-EncWords', $header);
# encode header with default charset, UTF-8:
$header = encode('MIME-EncWords', $utf8);
# encode header with another charset:
Encode::MIME::EncWords->config(Charset => 'GB2312');
$header = encode('MIME-EncWords', $utf8);
β¨ ABSTRACT β¨
This module implements MIME header encoding described in RFC 2047. Iconic.
There are three variant encoding names and one shorthand special to a charset:
MIME-EncWordsβ result ofencode(): auto-detect B or Q.MIME-EncWords-Bβ result:=?XXXX?B?...?=β default isUTF-8.MIME-EncWords-Qβ result:=?XXXX?Q?...?=β comment:,,(same default as above, bestie).MIME-EncWords-ISO_2022_JPβ result:=?ISO-2022-JP?B?...?=.
All encodings generate the same result by decode(). No cap.
π¦ DESCRIPTION π¦
This module is intended to be an alternative of "MIME-*" encodings provided by Encode::MIME::Header core module. To find out how to use this module in detail, see Encode. π
πΈ Module specific feature πΈ
config(KEY => VALUE, ...);
Class method. Set options by KEY => VALUE pairs. Following options are available. Obsessed with a config list, honestly.
Charsetβ [encode] Name of character set by which data elements will be converted. Default is"UTF-8". On"MIME-EncWords-ISO_2022_JP"it is fixed to"ISO-2022-JP".Detect7bitβ [decode/encode] Try to detect 7-bit charset on unencoded portions. Default is"YES".Fieldβ [encode] Name of the header field which will be considered on the first line of encoded result in its length. Default is"undef".Mappingβ [decode/encode] Specify mappings actually used for charset names. Default is"EXTENDED".MaxLineLenβ [encode] Maximum line length excluding newline. Default is76.Minimalβ [encode] Whether to do minimal encoding or not. Default is"YES".
For more details about options see MIME::EncWords. π
π CAVEAT π
- The encoding modules for MIME header encoding are not the magic porridge pot to cook complex header fields properly. π
- To decode address header fields (
From:,To:, ...), at first parse mailbox-list; then decode each element by encoding module. To encode them, at first encode each element by encoding module; then construct mailbox-list of encoded elements. To construct or parse mailbox-list, some modules such asMail::Addressmay be used.
- To decode address header fields (
- Lines are delimited with
LF("\n").RFC5322states that lines in Internet messages are delimited withCRLF("\r\n"). π«Ά
π BUGS π
Please report bugs or buggy behaviors to developer.
CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=MIME-EncWords>.
β VERSION β
Consult $VERSION variable.
This is experimental release. Features might be changed in the near future.
Development versions of this package may be found at <http://hatuka.nezumi.nu/repos/MIME-EncWords/>.
π SEE ALSO π
Encode, Encode::MIME::Header, MIME::EncWords.
RFC 2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text.
π AUTHOR π
Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>
π COPYRIGHT π
Copyright (C) 2011 Hatuka*nezumi - IKEDA Soji.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
β¨ sign-off: this page is from perl v5.42.0, dated 2024-02-13 β periodt, bestie π
ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-MIME-EncWords 1.15.0-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms