Date: 08/10/01
- Next message: Zeev Suraski: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/sablot php_sablot.h"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/sablot php_sablot.h"
- In reply to: Piotr Pawlow: "[PHP-DEV] PHP4.0.6, php_iconv bugs"
- Next in thread: Piotr Pawlow: "Re: [PHP-DEV] PHP4.0.6, php_iconv bugs"
- Reply: Piotr Pawlow: "Re: [PHP-DEV] PHP4.0.6, php_iconv bugs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
["Piotr Pawlow" <pp <email protected>>]
> 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).
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
-- Stig Sæther Bakken <ssb <email protected>> Fast Search & Transfer ASA, Trondheim, Norway-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Zeev Suraski: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/sablot php_sablot.h"
- Previous message: Sascha Schumann: "Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/sablot php_sablot.h"
- In reply to: Piotr Pawlow: "[PHP-DEV] PHP4.0.6, php_iconv bugs"
- Next in thread: Piotr Pawlow: "Re: [PHP-DEV] PHP4.0.6, php_iconv bugs"
- Reply: Piotr Pawlow: "Re: [PHP-DEV] PHP4.0.6, php_iconv bugs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

