ID: 36797
Updated by: iliaa@php.net
Reported By: mauroi at digbang dot com
-Status: Open
+Status: Assigned
Bug Type: PDO related
Operating System: Win XP SP2
PHP Version: 5.1.2
-Assigned To:
+Assigned To: wez
Previous Comments:
------------------------------------------------------------------------
[2006-03-20 15:29:43] mauroi at digbang dot com
I've tried but the same happens.
I've also tried the complete NLS_LANG (AMERICAN_AMERICA.AL32UTF8) with
no success.
Thanks!
------------------------------------------------------------------------
[2006-03-20 15:25:04] tony2001@php.net
Try with "AL32UTF8" instead of "UTF-8".
------------------------------------------------------------------------
[2006-03-20 15:22:13] mauroi at digbang dot com
Description:
------------
I'm trying to use a AL32UTF8 database with PDO, but it seems that the
charset is not correctly set (I get funny characters in the output).
I've tried the method described in
(http://www.oracle.com/technology/pub/articles/php_experts/otn_pdo_oracle5.html)
with no success.
I'm using Oracle instant client for Windows.
Reproduce code:
---------------
sql:
create table foo (field varchar(10));
php:
$a = new PDO('oci:dbname=server;charset=UTF-8', 'user', 'password');
$a->beginTransaction();
$b = $a->prepare('insert into foo (field) values (?)');
$b->bindValue(1, 'áéíóú');
$b->execute();
$c = $a->prepare('select * from foo');
$c->execute();
var_dump($c->fetchAll());
$a->rollBack();
Expected result:
----------------
the result with the row with áéíóú correctly displayed
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36797&edit=1