ENCODE::UNICODE::UTF7(3perl)
π NAME
Encode::Unicode::UTF7 β the UTF-7 encoding girlies, that's it, that's the module π
β¨ SYNOPSIS β¨
use Encode qw/encode decode/;
$utf7 = encode("UTF-7", $utf8);
$utf8 = decode("UTF-7", $ucs2);
π ABSTRACT π
okay so bestie, this module implements the UTF-7 encoding as documented in RFC 2152. and UTF-7, like the name literally says, is a 7-bit re-encoded version of UTF-16BE. it was designed to be MTA-safe and everyone expected it to become the standard way to swap Unicode-y mails around over mail. iconic plan, truly. BUT β and this is the plot twist π β once UTF-8 showed up and MTAs got 8-bit compliant, UTF-7 basically stopped being used at all. it's giving retired influencer.
and because of that whole situation, UTF-7 was not supported by Encode until version 1.95. no cap. but Unicode::String β that's a module by Gisle Aas that adds Unicode supports to non-utf8-savvy perl β did support UTF-7. so the UTF-7 support got added here so that Encode can supersede Unicode::String 100%. eat that, we're the upgrade now π
β¨
πΈ In Practice πΈ
so when you actually wanna encode Unicode for mails and web pages?? do NOT use UTF-7 unless you are sure your recipients and readers can handle it. fr fr. very few MUAs and WWW Browsers support these days β literally only Mozilla seems to support one ππ« . for general cases, use UTF-8 for the message body and MIME-Header for the header instead. that's the move, that's the vibe, periodt.
π SEE ALSO π
EncodeEncode::UnicodeUnicode::StringRFC 2781<http://www.ietf.org/rfc/rfc2152.txt>
okay bye bestie, that's the whole page π this was perl v5.44.0, dated 2026-10-17, and yes the page is literally called Encode::Unicode::UTF7(3perl) β go forth and encode responsibly, mwah π«Άπ¦πΈ
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms