Ask a Question related to PHP Bugs, Design and Development.
-
jhtpeter at gmail dot com #1
#39103 [Opn]: Oracle CLOB Charset Incorrect
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 [url]http://bugs.php.net/?id=39103&edit=1[/url]
jhtpeter at gmail dot com Guest
-
#40787 [NEW]: Error trying to insert into a CLOB column when using multi-byte charset.
From: jarismar at adplabs dot com dot br Operating system: PHP version: 5.2.1 PHP Bug Type: PDO related Bug description: ... -
#39103 [NEW]: Oracle CLOB Charset Incorrect
From: jhtpeter at gmail dot com Operating system: Linux PHP version: 5.2.0RC5 PHP Bug Type: OCI8 related Bug description: ... -
Oracle CLOB Truncation > 64K
We have an update and insert query for a large text field (Oracle CLOB). When we run the query on long text, it truncates the excess. ... -
[PHP4.1.2] Incorrect browser charset recognition
I have a problem with browser charset recognition when using PHP 4.1.2 (this is the PHP version which our hosting company provides). For charset... -
Oracle CLOB using DBI
Does someone have a working code sample of Perl/DBI returning a CLOB column from Oracle. Here is what I came up with, I counld not get ORA_CLOB...



Reply With Quote

