#46119 [Com]: Some UTF8 characters from database show up wrong
| From: | jonr at light dot is | Date: | Thu, 18 Sep 2008 16:12:06 +0000 |
| Subject: | #46119 [Com]: Some UTF8 characters from database show up wrong | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129093@lists.php.net to get a copy of this message | ||
ID: 46119
Comment by: jonr at light dot is
Reported By: jonr at light dot is
Status: Open
Bug Type: Oracle related
Operating System: Windows XP
PHP Version: 5.2.6
New Comment:
Probably a duplicate:
http://bugs.php.net/bug.php?id=36797
Previous Comments:
------------------------------------------------------------------------
[2008-09-18 16:06:39] jonr at light dot is
Description:
------------
PHP displays some UTF-8 strings wrongly. E.g. "ÁÉÝÚÓÞÆÐ" is rendered as
"ÁÿÝÿÿÿÿÐ".
Reproduce code:
---------------
First Oracle db insert:
insert into temp values (convert('ÁÉÝÚÓÞÆÐ','UTF8'));
$pdo = new PDO('oci:dbname=//localhost/ora','user','pass');
$sth = $pdo->prepare("select * from temp");
$sth->execute();
$sth->fetchAll(PDO::FETCH_ASSOC);
echo $sth[0]['TEXT'];
Expected result:
----------------
ÁÉÝÚÓÞÆÐ
Actual result:
--------------
ÁÿÝÿÿÿÿÐ
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46119&edit=1