Your string is (HTML) entity-encoded (which you would have also seen by printing it. Either that's this webmail hoster doing this, or it is your program which sends it. I really wonder why you are trying to send email without knowing what your text is in. And why you are scraping the text content from some external web site.
So, your first step would be to make sure you know what encoding your subject string is in. If it is HTML entities, then HTML::Entities::decode can turn that into an UTF-8 string, which you can then in turn Base64-encode for the MIME subject header. But in reality, it would be much better to eliminate the HTML part of the equation and directly set the subject to some well-known characters in a well-known encoding yourself directly, for example by using:
my $subject = 'Hello World';
except using cyrillic charset, potentially in utf8 or KOI-8:
use utf8; my $subject = 'Hello World'; # except in cyrillic
or
use Encoding 'KOI-8'; my $subject = 'Hello World'; # except in cyrillic
if your source code editor supports KOI-8.
In reply to Re^7: Problem with russian / cyrillic in e-mail program.
by Corion
in thread Problem with russian / cyrillic in e-mail program.
by dbmathis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |