PHP4.0.6, php_iconv bugs
| From: | Piotr Pawlow | Date: | Thu, 09 Aug 2001 17:36:15 +0000 |
| Subject: | PHP4.0.6, php_iconv bugs | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-62723@lists.php.net to get a copy of this message | ||
Hello,
I have noticed that php_iconv sometimes fails to convert the string
due to invalid sequence of characters on input, and there is no way to
find out where the bad sequence is. I think there should be an
optional parameter added to iconv() function, a variable passed by
reference. If used, iconv would in case of an error return partially
converted string, and set this variable to character index at which
the conversion failed.
Also, php_iconv makes a wrong assumption that the longest sequence
representing one char is as long as sizeof(ucs4_t). For example,
unicode combined characters can easily be longer, the same applies to
encodings like 'JAVA' (\uNNNN).
--
Best regards,
Piotr Pawlow
mailto:pp@siedziba.pl