|The stupid question is the question not asked|
Module for decoding utf-8 imap headers?by nysus (Parson)
|on May 30, 2020 at 16:45 UTC||Need Help??|
nysus has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the Mail::IMAPClient module to fetch emails from my inbox. It works well, but after getting a good way through writing a wrapper for it, I discovered that it doesn't seem to handle UTF-8 encoded email headers that look something like this:
This example is a "From" header.
Maybe it's because the module didn't know about such things in 2003. At any rate, I tried the Encode::Simple module like this to try to clean things up:
My approach did not work, however. The string was unchanged. Further confusing me is that some headers look more like url encoding than utf8 encoding:
So how do I properly handle these encoded headers?
$PM = "Perl Monk's";