function mime_header_decode
Same name and namespace in other branches
- 6.x drupal-6.x/includes/unicode.inc \mime_header_decode()
Decodes MIME/HTTP encoded header values.
Parameters
$header: The header to decode.
Return value
string The mime-decoded header.
See also
Archivo
- drupal-7.x/
includes/ unicode.inc, line 413 - Provides Unicode-related conversions and operations.
Código
function mime_header_decode($header) {
// First step: encoded chunks followed by other encoded chunks (need to collapse whitespace)
$header = preg_replace_callback('/=\?([^?]+)\?(Q|B)\?([^?]+|\?(?!=))\?=\s+(?==\?)/', '_mime_header_decode', $header);
// Second step: remaining chunks (do not collapse whitespace)
return preg_replace_callback('/=\?([^?]+)\?(Q|B)\?([^?]+|\?(?!=))\?=/', '_mime_header_decode', $header);
}