Click here to get back home

imap_fetchbody and character encoding

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
imap_fetchbody and character encoding Hugh Oxford 06-03-2008
Get Chitika Premium
Posted by Hugh Oxford on June 3, 2008, 5:42 pm
Please log in for more thread options
Hi,

I use imap_fetchbody to retrieve a message from the server, and I end up
with something which contains lots of characters like this...

=0A=0A=EF=BB=BF
I have tried quoted_printable_decode(), which eliminates most of the
problems, however sometimes a message comes in in which pound sterling
signs are converted into characters unreadable by firefox, and
represented by a question mark.

Removing quoted_printable_decode() renders that character as "=A3".

Not all emails are affected, and some are fine.

Does anyone know of how to detect messages which are likely to cause
this problem, and convert those messages into a character encoding that
is correct?

I have tried mb_convert_encoding, with no luck.



Similar ThreadsPosted
Character Encoding Issues November 9, 2004, 3:22 pm
Swedish character encoding July 16, 2006, 3:22 pm
Php4/Mysql and character encoding October 24, 2005, 7:19 pm
How to determine character encoding of a file? November 18, 2005, 2:54 pm
PHP and MSSQL character encoding problem. July 14, 2008, 9:39 am
HTTP Request, character encoding and fsockopen January 19, 2008, 3:18 am
character encoding problem - =?iso-8859-1?b?ow==?= (pound) sign October 27, 2005, 8:54 am
Find out encoding of a file with php, and convert it to UTF-8 encoding July 23, 2006, 5:26 am
Encoding MP3/WMA through PHP February 14, 2005, 2:42 am
PDF encoding April 26, 2005, 8:39 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap