note 95215 modified in function.mb-decode-mimeheader by danbrown

From: Date: Mon, 21 Dec 2009 17:18:42 +0000
Subject: note 95215 modified in function.mb-decode-mimeheader by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164240@lists.php.net to get a copy of this message
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. --was-- 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: 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. http://php.net/manual/en/function.mb-decode-mimeheader.php

« previous php.notes (#164240) next »