MailCore / mailcore2

MailCore 2 provide a simple and asynchronous API to work with e-mail protocols IMAP, POP and SMTP. The API has been redesigned from ground up.
Other
2.6k stars 625 forks source link

MCOMessageParser for windows-1251 encoding #1759

Open siberianisaev opened 6 years ago

siberianisaev commented 6 years ago

I'm trying to parse html text using MCOMessageParser.

NSString *htmlBody = [messageParser htmlRenderingWithDelegate:self];

The message contains Cyrillic and Latin characters. Template:

X-OriginatorOrg: hotmail.com
...
...
...
Content-Type: text/plain; charset="windows-1251"
Content-Transfer-Encoding: quoted-printable

=C0 =F2=E5=EF=E5=F0=FC =F2=E5=F1=F2 =F1 =D5=EE=F2=EC=E5=E9=EB=E0

Html with Latin characters:
...
...
...

(Yep, content type is text/plain, but it contains HTML)

The results looks like:

À òåïåðü òåñò ñ Õîòìåéëà

Html with Latin characters:
...
...

Must be:

А теперь тест с Хотмейла

Html with Latin characters:
...
...

Is windows-1251 encoding supported?

siberianisaev commented 6 years ago

potentially related issue https://github.com/MailCore/mailcore2/issues/989