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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.