Encode::MIME::EncWords(3pm) | User Contributed Perl Documentation | Encode::MIME::EncWords(3pm) |
Encode::MIME::EncWords -- MIME 'B' and 'Q' header encoding (alternative)
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);
This module implements MIME header encoding described in RFC 2047. There are three variant encoding names and one shorthand special to a charset:
Encoding name Result of encode() Comment ------------------------------------------------------------------- MIME-EncWords (auto-detect B or Q) MIME-EncWords-B =?XXXX?B?...?= Default is UTF-8. MIME-EncWords-Q =?XXXX?Q?...?= ,, MIME-EncWords-ISO_2022_JP =?ISO-2022-JP?B?...?=
All encodings generate the same result by decode().
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.
For more details about options see MIME::EncWords.
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 as Mail::Address may be used.
Please report bugs or buggy behaviors to developer.
CPAN Request Tracker: <http://rt.cpan.org/Public/Dist/Display.html?Name=MIME-EncWords>.
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/>.
Encode, Encode::MIME::Header, MIME::EncWords.
RFC 2047 MIME (Multipurpose Internet Mail Extensions) Part Three: Message Header Extensions for Non-ASCII Text.
Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>
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.
2022-11-19 | perl v5.36.0 |