Answer the question
In order to leave comments, you need to log in
Perl library for decoding - is there a ready-made solution?
All the best!
Sorry if this question has been asked, I couldn't find an answer to it.
In Perl, through the Net::IMAP::Simple library, I get email subjects in the following form:
=?windows-1251?B?yuDqIOTuIOLg8SDk7vXn4u7t6PLx/w==?=
=?koi8-r?B?8NLBytMtzMnT1CDEzNEg4czYwsXS1ME=?=
=?UTF-8?B?0J3QtdC00L7RgdGC0LDQstC70LXQvdC90L7QtSDRgdC+0L7QsdGJ0LXQvdC40LU=?=
=?koi8-r?B?z9TXxdQgzsEg2sHLwdo=?=
=?windows-1251?B?8eIg4OLy7iDv8ODp8Q==?=
=?koi8-r?B?9OXNwXRlc3TUxQ==?=
Answer the question
In order to leave comments, you need to log in
use Encode qw(decode);
print decode("MIME-Header", 'Subject: =?windows-1251?B?yuDqIOTuIOLg8SDk7vXn4u7t6PLx/w==?=')."\n";
print decode("MIME-Header", 'Subject: =?koi8-r?B?8NLBytMtzMnT1CDEzNEg4czYwsXS1ME=?=')."\n"
print decode("MIME-Header", 'Subject: =?UTF-8?B?0J3QtdC00L7RgdGC0LDQstC70LXQvdC90L7QtSDRgdC+0L7QsdGJ0LXQvdC40LU=?=')."\n";
Subject: Как до вас дохзвонится
Subject: Прайс-лист для Альберта
Subject: Недоставленное сообщение
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question