Jump to content

'Special character' problem.


franswen

Recommended Posts

Hi.

I wrote a little script to generate a web-page in which I can see how many emails I have in my mailbox, from whom and what is the subject (purpose to delete them at the server if I want to) :

 

$mbox = imap_open("{".$mailserver."}INBOX", $user, $password);
// fetch mailbox info
$mailboxinfo = imap_check($mbox);
echo "\t\tAantal berichten in mailbox: " . $mailboxinfo->Nmsgs . "<br><br>";
// fetch overview of all messages
$result = imap_fetch_overview($mbox, "1:".$mailboxinfo->Nmsgs, 0);
        foreach ($result as $overview)
        {           
        echo "\tMessage UID : " . $overview->uid . "<br>";
        echo "\tFrom : " . $overview->from . "<br>";
echo "\tSubject : " . $overview->subject . "<br><br>";
}
imap_close($mbox);

 

It works allright, except for some special characters when they are used in the Subject-line.

When the special character é is used in a word like privé (French for private), in the webpage appears =?ISO-8859-1?Q?priv=E9?= .

A special character like our euro-sign € , i.e. € 5.000,~ results in  =?ISO-8859-7?Q?=A4_5,000.~?= .

 

Anyone any idea how I can solve this?

Thanks, Frans

 

Link to comment
https://forums.phpfreaks.com/topic/115708-special-character-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.