Description of Problem: Iconv can not handle encodings that may contain null bytes (eg. UCS2) Version-Release number of selected component (if applicable): php-4.0.6-15 How Reproducible: <? $s = iconv("UTF-8", "UCS-4BE", "string"); $a = unpack("N*", $s); foreach($a as $val) { print "&#$val;"; } print "\n"; ?> Actual Results: (empty line) Expected Results: string
Created attachment 53386 [details] Suggested fix
I'm using the attached patch for about 4 months applied over php-4.0.6-x from redHat's source RPMS. (I recompile php anyways because I also need the mcrypt extension). A similar patch was submitted for php-4.1 CVS. The Latest CVS version from PHP contains newer enhancements that I havn't tried yet.
Thanks for the report. Presuming this is fixed in php-4.1.x based packages; please reopen if this bug is reproducible in current releases.