php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4010 Unable to get recode_string to work
Submitted: 2000-04-03 11:46 UTC Modified: 2005-03-31 16:13 UTC
From: krist at fast dot no Assigned:
Status: Wont fix Package: Misbehaving function
PHP Version: 3.0.15 OS: linux redhat 6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: krist at fast dot no
New email:
PHP Version: OS:

 

 [2000-04-03 11:46 UTC] krist at fast dot no
I'm running apache 1.3.12 with php 3.0.15 compiled with GNU recode 3.5c
on linux redhat 6.1.

The GNU recode package is to be used for converting between different
encodings. When calling the recode program from the command line, I can easily convert from ISO-8859-1 to UTF-8 and then back to ISO-8859-1, ending up with the same result as I started with.

When I use the recode program from within php, I'm not able to convert
back to ISO-8859-1.

The php test code looks like this:

    $a = "???" ;

    $b = recode_string("ISO-8859-1..UTF-8", $a) ;
    $c = recode_string("UTF-8..ISO-8859-1", $b) ;

    print "a = $a<br>" ;
    print "b = $b<br>" ;
    print "c = $c<br>" ;

The output should be $c with the same value as $a, but all I get is

a = ???
b = øåæ
c =

Am I using the program correctly ? Is this a known bug ? Is there any way I can debug it ?

Thanks,
Kristian Halle
krist@fast.no


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 11 18:01:24 2020 UTC