downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mb_decode_numericentity> <mb_convert_variables
Last updated: Fri, 05 Feb 2010

view this page in

mb_decode_mimeheader

(PHP 4 >= 4.0.6, PHP 5)

mb_decode_mimeheaderDecode string in MIME header field

Description

string mb_decode_mimeheader ( string $str )

Decodes encoded-word string str in MIME header.

Parameters

str

The string being decoded.

Return Values

The decoded string in internal character encoding.

See Also



add a note add a note User Contributed Notes
mb_decode_mimeheader
Dmitri Snytkine
18-Dec-2009 09:16
This function leaves the underscores in the string.
For example, the mime header looks like this:
$text = "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@example.com>";

Then I decode this string like this:

<?php
mb_internal_encoding
("UTF-8");
$ret2 = mb_decode_mimeheader($text);
?>

The result is decoded string which looks OK except that the underscores between the first, middle and last names are still there.

Keld_Jørn_Simonsen

imap_utf8($text) does not show underscores, which is the correct way, except that on my Windows PC the imap_utf8() converts result to upper case, which is a known bug.
Frogger2000 at gmx dot de
29-May-2002 08:16
Using quoted-printable-encoding the hex-numbers must be written in uppercase letters!

Works: =?iso-8859-1?q?=3F=3F=3F?=
Fails: =?iso-8859-1?q?=3f=3f=3f?=

mb_decode_numericentity> <mb_convert_variables
Last updated: Fri, 05 Feb 2010
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites