["Piotr Pawlow" <[EMAIL PROTECTED]>]
> 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).
Did you test the same thing with another program using iconv?
I've encountered the same problem in iconv when I tried to convert an
ISO-8859-1 string containing "~" to Shift_JIS. Shift_JIS actually
does not define the tilde character, so iconv bailed out and returned
an empty string (the solution is using codepage 932 instead when
people ask for Shift_JIS. Bleh.)
Stig Sæther Bakken <[EMAIL PROTECTED]>
Fast Search & Transfer ASA, Trondheim, Norway
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]