|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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 ?

Kristian Halle


Add a Patch

Pull Requests

Add a Pull Request


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-2021 The PHP Group
All rights reserved.
Last updated: Tue Dec 07 21:03:33 2021 UTC