From: Operating system: PHP version: 5.3.6 Package: PDO related Bug Type: Bug Bug description:PDO_OCI: UTF-8 output gets truncated
Description: ------------ Data is stored in ANSI charset (CL8MSWIN1251) while connection uses UTF-8. PDOStatement::fetchAll() generates warning and fields containing non-english characters gets truncated. For example, PDO outputs only 53 UTF-8 russian characters for VARCHAR2(100) field. MySQL's PDOStatement::fetchAll() works fine in the same situation. Test script: --------------- $pdo = new PDO('oci:dbname=[host];charset=UTF8', '[user]', '[pass]'); $cmd = $pdo->query('SELECT * FROM user'); var_dump($cmd->fetchAll()); Expected result: ---------------- Table field(s) not truncated, no warnings Actual result: -------------- Table field(s) gets truncated, PHP warning: PDOStatement::fetchAll() [<a href='pdostatement.fetchall'>pdostatement.fetchall</a>]: column 0 data was too large for buffer and was truncated to fit it -- Edit bug report at http://bugs.php.net/bug.php?id=54379&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54379&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54379&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54379&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54379&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54379&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54379&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54379&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54379&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54379&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54379&r=support Expected behavior: http://bugs.php.net/fix.php?id=54379&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54379&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54379&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54379&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54379&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54379&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54379&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54379&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54379&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54379&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54379&r=mysqlcfg