#39103 [Opn->Fbk]: Oracle CLOB Charset Incorrect
| From: | tony2001@php.net | Date: | Tue, 10 Oct 2006 08:52:51 +0000 |
| Subject: | #39103 [Opn->Fbk]: Oracle CLOB Charset Incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103343@lists.php.net to get a copy of this message | ||
ID: 39103
Updated by: tony2001@php.net
Reported By: jhtpeter at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5.2.0RC5
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2006-10-10 02:18:46] 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)
------------------------------------------------------------------------
[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