Decode email subjects into unicode

akomack100 at gmail.com akomack100 at gmail.com
Tue Apr 18 19:26:47 EDT 2017


On Wednesday, March 19, 2008 at 3:24:45 AM UTC-7, Laszlo Nagy wrote:
> Gertjan Klein wrote:
> > Laszlo Nagy wrote:
> >
> >   
> >> However, there are malformed emails and I have to put them into the 
> >> database. What should I do with this:
> >>     
> > [...]
> >   
> >> There is no encoding given in the subject but it contains 0x92. When I 
> >> try to insert this into the database, I get:
> >>     
> >
> > This is indeed malformed email. The content type in the header specifies
> > iso-8859-1, but this looks like Windows code page 1252, where character
> > \x92 is a single right quote character (unicode \x2019).
> >
> > As the majority of the mail clients out there are Windows-based, and as
> > far as I can tell many of them get the encoding wrong, I'd simply try to
> > decode as CP1252 on error, especially if the content-type claims
> > iso-8859-1. Many Windows mail clients consider iso-8859-1 equivalent to
> > 1252 (it's not; the former doesn't use code points in the range \x8n and
> > \x9n, the latter does.)
> >
> >   
> Thank you very much!

Im sorry to intrude this conversation but I was wondering if I could get some help with a partial email (n********7 at m***.ru) this is how it appears when its obviously being hidden and I need the full email so I can get a hacker off my back and get my accounts returned to me my business needs these accounts to run. Help please!



More information about the Python-list mailing list