MaskRay / wikileaks-email-search

1 stars 1 forks source link

Just use Content-Type for charset #1

Open Artoria2e5 opened 8 years ago

Artoria2e5 commented 8 years ago

Every part in an raw eml comes with a Content-Type header, which often says about the charset:

Content-Type: multipart/alternative;
    boundary="_000_113CDEC5095740148F4B6257D0283D48dncorg_"
MIME-Version: 1.0

--_000_113CDEC5095740148F4B6257D0283D48dncorg_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

How many more states can we get to follow Connecticut?  Way to go!

[...]

--_000_113CDEC5095740148F4B6257D0283D48dncorg_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

In fact there is something called email.message_from_bytes.

MaskRay commented 8 years ago

赞~

MaskRay commented 8 years ago

不同MIME部分编码可以不同,不知道怎么弄好

Artoria2e5 commented 8 years ago

from bytes,让模块解决啊。

MaskRay commented 8 years ago

这其实是个内部Code Sprint.... 已经被坑了(