Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to read emails with special chars

I have tons of email in my inbox (mostly spam), I have a php script that reads email all of these emails and put them in different folders (I have a custom php email reader using the imap php functions).

My problem is this:

Some emails have weird characeters in it, here is a sample:
Search Engine Marketing will increase your companyâ<80><99>s online presence through comprehensive online marketing campaigns

I can convert the &acirc; without any problems, but as you can see I have <80><99> chars, how can I go about converting them?

like image 949
Buba Wilson Avatar asked Dec 29 '11 21:12

Buba Wilson


2 Answers

Use iconv to convert from one encoding to another.

like image 92
jaypal singh Avatar answered Oct 25 '22 14:10

jaypal singh


That's not acirc<80><99>, it's utf-8 for Unicode RIGHT SINGLE QUOTATION MARK.

like image 26
choroba Avatar answered Oct 25 '22 16:10

choroba