downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

imap_utf7_encode> <imap_unsubscribe
[edit] Last updated: Thu, 23 May 2013

view this page in

imap_utf7_decode

(PHP 4, PHP 5)

imap_utf7_decodeDecodifica una cadena codificada con UTF-7 modificado

Descripción

string imap_utf7_decode ( string $text )

Decodifica el parámetro text UTF-7 modificado en una cadena ISO-8859-1.

Esta función es necesaria para decodificar nombres de buzones que contienen ciertos caracteres que no están en el rango de caracteres imprimibles de ASCII.

Parámetros

text

Una cadena codificada UTF-7 modificado, como está definido en » RFC 2060, sección 5.1.3 (el UTF-7 original fue definido en » RFC1642).

Valores devueltos

Devuelve una cadena que está codificada en ISO-8859-1 y consisite en la misma secuencia de caracteres de text, o FALSE si text contiene una secuencia UTF-7 modificado no válida o text contiene un carácter que no es parte del conjunto de caracteres ISO-8859-1.

Ver también



imap_utf7_encode> <imap_unsubscribe
[edit] Last updated: Thu, 23 May 2013
 
add a note add a note User Contributed Notes imap_utf7_decode - [3 notes]
up
0
Min He
3 years ago
For Chinese charset, we can use:

mb_convert_encoding($mailbox, "UTF7-IMAP", "GB2312");

when you want to create a mailbox in Chinese.

OR

mb_convert_encoding($mailbox, "GB2312", "UTF7-IMAP");

when you want to show the listed mailbox with the right charset.
up
0
Anonymous
10 years ago
For "Outlook-style" UTF-7, you can also use:

mb_convert_encoding( $str, "ISO_8859-1", "UTF7-IMAP" ); # for decoding
mb_convert_encoding( $str, "UTF7-IMAP", "ISO_8859-1" ); # for encoding
up
0
sven at planb dot de
12 years ago
imap_utf7_decode decodes 'modified'.
For decoding Outlook UTF-7 - texts I use --enable-recode and $latin1string=recode_string("UTF-7..ISO_8859-1",$utf7string);
Don't use recode-3.5c.*rpm from Contrib.
recode_string seems to be buggy.

 
show source | credits | sitemap | contact | advertising | mirror sites