Bug 63215 - Iconv converting to/from UCS encoding - wrong results
Iconv converting to/from UCS encoding - wrong results
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-04-11 05:36 EDT by Itai Nahshon
Modified: 2007-04-18 12:41 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-04-05 08:24:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Suggested fix (3.08 KB, patch)
2002-04-11 05:52 EDT, Itai Nahshon
no flags Details | Diff

  None (edit)
Description Itai Nahshon 2002-04-11 05:36:50 EDT
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: 
&#115;&#116;&#114;&#105;&#110;&#103;
Comment 1 Itai Nahshon 2002-04-11 05:52:50 EDT
Created attachment 53386 [details]
Suggested fix
Comment 2 Itai Nahshon 2002-04-11 05:56:56 EDT
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. 
Comment 3 Joe Orton 2004-04-05 08:24:50 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.