note 70859 deleted from ref.exec by nlopess

From: Date: Wed, 01 Nov 2006 12:31:16 +0000
Subject: note 70859 deleted from ref.exec by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-119290@lists.php.net to get a copy of this message
Note Submitter: herbert fischer (a) gmail com ---- I'm calling svn from PHP and sometimes I got accented characters from some subversion repositories. If I manually call svn to list this repository and pipe it's output to iconv to convert to utf-8, it works. But, when running svn from PHP, I'm not able to convert to utf-8. The accented name that appears is "Acentuação" witch shows up on PHP like "Acentua?\195?\167?\195?\163o". Any hints? Working ex.: # svn list 'file:////home/svn/herbert/' | iconv -tutf8 Non-working ex.: <?php $cmd = "svn list 'file:////home/svn/herbert/'"; $out = shell_exec($cmd); echo mb_convert_encoding($out, 'utf-8', 'iso-8859-1'); echo iconv('iso-8859-1', 'utf-8', $out); ?>

« previous php.notes (#119290) next »