ID: 39103 User updated by: jhtpeter at gmail dot com Reported By: jhtpeter at gmail dot com Status: Open Bug Type: OCI8 related Operating System: Linux PHP Version: 5.2.0RC5 New Comment:
Description: ------------ I use oic(Oracle Instance Client) to call php-oci functions with php 5.2.x-dev. The Oracle10g Database Server Charset is AL32UTF8. The Web Env NLS_LANG is "SIMPLIFIED CHINESE_CHINA.ZHS16GBK". When i get CLOB use oci_fetch_array with options OCI_RETURN_LOBS, php return incorrect charset. While VARCHAR2 COLUMN is correct. The same to oci_fetch_all. Reproduce code: --------------- $sql = "SELECT VARCHAR2_TITLE, CLOB_CONTENT FROM TEST"; oci_prase... oci_fetch_array... Expected result: ---------------- VARCHAR2_TITLE: ±êÌâ(correct charset in ZHS16GBK) CLOB_CONTENT: ÄÚÈÝ(correct charset in ZHS16GBK) Actual result: -------------- VARCHAR2_TITLE: ±êÌâ(correct charset in ZHS16GBK) CLOB_CONTENT: £¿£¿£¿£¿(incorrect charset in AL32UTF8) Previous Comments: ------------------------------------------------------------------------ [2006-10-10 02:11:36] jhtpeter at gmail dot com Description: ------------ I use oic(Oracle Instance Client) to call php-oci functions with php 5.2.x-dev. The Oracle10g Database Server Charset is AL32UTF8. The Web Env NLS_LANG is "SIMPLIFIED CHINESE_CHINA.ZHS16GBK". When i get CLOB use oci_fetch_array with options OCI_RETURN_LOBS, php return incorrect charset. While VARCHAR2 COLUMN is correct. The same to oci_fetch_all. Reproduce code: --------------- $sql = "SELECT VARCHAR2_TITLE, CLOB_CONTENT FROM TEST"; oci_prase... oci_fetch_array... Expected result: ---------------- VARCHAR2_TITLE: ±êÌâ(correct charset in ZHS16GBK) CLOB_CONTENT: ÄÚÈÝ(correct charset in ZHS16GBK) Actual result: -------------- VARCHAR2_TITLE: ±êÌâ(correct charset in ZHS16GBK) CLOB_CONTENT: ÄÚÈÝ(incorrect charset in AL32UTF8) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39103&edit=1