ID: 45659 Updated by: [EMAIL PROTECTED] Reported By: cuichangjie at gmail dot com -Status: Open +Status: Feedback Bug Type: OCI8 related Operating System: windows xp PHP Version: 5.2.6 -Assigned To: +Assigned To: sixd New Comment:
Please give Oracle DB and Oracle client versions. What is the DB character set and what are the NLS settings used by PHP? Do you specify a character set in oci_connect()? Previous Comments: ------------------------------------------------------------------------ [2008-07-30 07:56:13] cuichangjie at gmail dot com 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 this bug report at http://bugs.php.net/?id=45659&edit=1