You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

mail_decode_text()

Usage

mail_decode_text(text)

Description
Decode “unstructured” headers, that is, headers that are defined as ‘*text’ as per RFC 822.
The string is decoded using the algorithm specified in RFC 2047, Section 6.1. If the charset-conversion fails for any sequence, it is returned as-is.
If the String is not an RFC 2047 style encoded header, it is also returned as-is

Example

${mail_decode_text('=?utf-8?Q?h=C3=A4llo?=')}

results in

hällo

Search results for "mail_decode_text()"

mail_decode_text()

Decode “unstructured” headers, that is, headers that are defined as ‘*text’ as per RFC 822.
The string is decoded using the algorithm specified in RFC 2047, Section 6.1. If the charset-conversion fails for any sequence, it is returned as-is.
If the String is not an RFC 2047 style encoded header, it is also returned as-is

mail_decode_text(text)