PHP 8.5.0 Alpha 1 available for testing

mb_decode_mimeheader

(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)

mb_decode_mimeheaderDecodifica un encabezado MIME

Descripción

mb_decode_mimeheader(string $string): string

Decodifica la cadena codificada string en el encabezado MIME.

Parámetros

string

La cadena a decodificar.

Valores devueltos

La cadena decodificada, con un codificación interna.

Historial de cambios

Versión Descripción
8.3.0 Los guiones bajos son convertidos en espacios como se especifica en » RFC 2047.

Ver también

add a note

User Contributed Notes 4 notes

up
3
tomlove at gmail dot com
15 years ago
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.
up
0
hgs at cs dot columbia dot edu
4 years ago
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.
up
0
Frogger2000 at gmx dot de
23 years ago
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?=
To Top