note 70859 added to ref.exec
| From: | (a) | Date: | Wed, 01 Nov 2006 12:25:29 +0000 |
| Subject: | note 70859 added to ref.exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119288@lists.php.net to get a copy of this message | ||
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);
?>
----
Server IP: 66.163.161.117
Probable Submitter: 200.234.208.27
----
Manual Page -- http://www.php.net/manual/en/ref.exec.php
Edit -- https://master.php.net/note/edit/70859
Del: integrated -- https://master.php.net/note/delete/70859/integrated
Del: useless -- https://master.php.net/note/delete/70859/useless
Del: bad code -- https://master.php.net/note/delete/70859/bad+code
Del: spam -- https://master.php.net/note/delete/70859/spam
Del: non-english -- https://master.php.net/note/delete/70859/non-english
Del: in docs -- https://master.php.net/note/delete/70859/in+docs
Del: other reasons-- https://master.php.net/note/delete/70859
Reject -- https://master.php.net/note/reject/70859
Search -- https://master.php.net/manage/user-notes.php