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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to