iconv with UTF-7-IMAP support
| From: | Bjai | Date: | Sat, 22 May 2004 04:10:20 +0000 |
| Subject: | iconv with UTF-7-IMAP support | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-186742@lists.php.net to get a copy of this message | ||
I have recently found someone that has written a patch for iconv library to
support UTF-7-IMAP encoding (http://www.technoids.org/utf7imap/index.html).
Within the patching instruction it is required to edit the iconv library
file of PHP in order to handle idiosncrasies #2 (there is an example of
editing the Perl equivalent file), in that the end-of-string in UTF-7 IMAP
must include bytes that set the encoding back to the US-ASCII state (with a
hyphen). However I am a newbie in C programming and I have tried to edit the
iconv.c file without success. I would very much appreciate if someone could
give me some help in applying the changes so that the iconv library of PHP
can handle UTF-7 IMAP encoding.
To summarize I think it is required to add a null character to end each
UTF-7 IMAP encoded character:
result = iconv(cd, (char **) NULL, &in_left, (char **) &out_p, &out_left);
I have made several attempts to add the above line into the php_iconv_string
function, but it didn't work (compiling is ok).
I would very much appreciate if someone could provide some advice or help in
the above.
Thank you in advance
Bjai