From: cuichangjie at gmail dot com Operating system: windows xp PHP version: 5.2.6 PHP Bug Type: OCI8 related Bug description: wrong size of japanese character
Description: ------------ When insert some japanese charectar (encoding type is "SJIS") using OCIBindByName and oci_execute, oracle has return the ORA-12899 error,it is seems like some addition bytes has been added after OCIBindByName. Reproduce code: --------------- //a table with 2 column, //empno -- number(1) //ename -- varchar2(6) $stmt = oci_parse($conn, " INSERT INTO emp (empno, ename) VALUES( :0, :1)"); $ret = OCIBindByName(stmt, ':0', 1); //error check ... $ret = OCIBindByName(stmt, ':1', '日本語'); //error check ... $ret = oci_execute($stmt); //error check ... oracle's error shows : ORA-12899: value too large for column "USER0"."MyTable"."ename" (actual: 9, maximum: 6)] Expected result: ---------------- The string: '日本語' should be 6 bytes, echo strlen('日本語'); //should show us : 6 -- Edit bug report at http://bugs.php.net/?id=45659&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45659&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45659&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45659&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45659&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45659&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45659&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45659&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45659&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45659&r=support Expected behavior: http://bugs.php.net/fix.php?id=45659&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45659&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45659&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45659&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45659&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45659&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45659&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45659&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45659&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45659&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45659&r=mysqlcfg