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
imap_utf7_decode
(PHP 4, PHP 5)
imap_utf7_decode — modified UTF-7 인코딩된 문자열을 디코딩한다.
Description
string imap_utf7_decode
( string $text
)
modified UTF-7형식의 text 를 8비트 데이터로 디코딩한다.
디코딩된 8비트 데이터를 돌려주거나, 입력 문자열이 유효한 modified UTF-7이 아니면 FALSE를 돌려준다. 이 함수는 출력가능한 아스키(ASCII)코드 범위를 벗어난 국제적인 문자를 갖는 메일박스 이름을 디코딩할 때 필요하다. modified UTF-7 인코딩은 » RFC 2060 , section 5.1.3 문서에 정의되어 있다( original UTF-7 은 » RFC1642문서에 정의되어 있었다).
imap_utf7_decode
27-Aug-2002 10:32
sven at planb dot de
03-Nov-2000 03:44
03-Nov-2000 03:44
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.
