mb_decode_mimeheader

(PHP 4 >= 4.0.6, PHP 5)

mb_decode_mimeheader — Decode string in MIME header field

Описание

string mb_decode_mimeheader ( string $str )

Decodes encoded-word string str in MIME header.

Список параметров

str

The string being decoded.

Возвращаемые значения

The decoded string in internal character encoding.

Смотрите также

Коментарии

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?=
2002-05-29 04:16:55
http://php5.kiev.ua/manual/ru/function.mb-decode-mimeheader.html
This function ignores any encoded-word specified in a character set not supported by the mbstring extension (e.g. Arabic windows-1256). Such encoded-words pass straight through.

RFC2047 doesn't specify the behaviour, but common agents such as Gmail, Windows Mail, etc. DO NOT ignore such encoded words. They are decoded as if they were declared to be in the local character set. 

Be aware of this idiosyncrasy.
2010-03-09 12:03:45
http://php5.kiev.ua/manual/ru/function.mb-decode-mimeheader.html
Автор:
See also the following functions which may work better in some cases:
iconv_mime_decode() - http://php.net/manual/function.iconv-mime-decode.php
imap_utf8() - http://php.net/manual/function.imap-utf8.php
2012-02-27 05:35:00
http://php5.kiev.ua/manual/ru/function.mb-decode-mimeheader.html
In Q encoding mode, RFC 2047 encodes spaces as _ (Section 4.2). 

mb_decode_mimeheader()

does not appear to do this. Thus, to avoid names or subjects with underscores, one needs to apply strtr() or similar function to the input string.

On the other hand, lower-case strings do now work correctly.
2021-06-30 21:21:45
http://php5.kiev.ua/manual/ru/function.mb-decode-mimeheader.html

    Поддержать сайт на родительском проекте КГБ