This encoding will not work for cyrus imapservers and you might have problems with other mail clients.
Use mb_convert_encoding($str, "UTF7-IMAP","ISO-8859-15") instead.
ps: mb_convert_encoding() requires building php with --enable-mbstring option
(PHP 3 >= 3.0.15, PHP 4, PHP 5)imap_utf7_encode -- Converts ISO-8859-1 string to modified UTF-7 text
Descriptionstring imap_utf7_encode ( string data )
Converts data to modified UTF-7 text. Note that data is expected to be encoded in ISO-8859-1.
This is needed to encode mailbox names that contain certain characters which are not in range of printable ASCII characters.
See also: imap_utf7_decode().
add a note User Contributed Notes
marcelo at maccoy dot com dot br
hartmut at six dot de