ID: 36797 Updated by: [EMAIL PROTECTED] Reported By: mauroi at digbang dot com Status: Assigned Bug Type: PDO related Operating System: Win XP SP2 PHP Version: 5.1.2 Assigned To: wez New Comment:
I'm also having the same problem in PHP 5.2.2. I've set NLS_LANG=AMERICAN_AMERICA.AL32UTF8 and my PDO DSN is oci:dbname=foo;charset=UTF-8. These don't seem to have any affect. The characters I send to the DB through PDO_OCI are still getting converted to ???????. The DB charset is AL32UTF8. I'm using Linux. When I change the DSN charset to AL32UTF8, then there is no output on the page, nor are there errors reported in the error log. PHP appears to crash but gives no response as to why. 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] [EMAIL PROTECTED] 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
