#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

I don't see any problems, though I would test it with --disable-all
--with-oci8=<...> instead.


Previous Comments:


[2006-09-27 12:11:25] masui at emplex dot co dot jp

Following is my php configure option. Is it correct?

./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--enable-mbstring \
--enable-mbregex \
--with-zlib \
--with-curl \
--with-dom \
--with-dom-xslt \
--with-openssl \
--enable-sigchild \
--with-oci8=/home/oracle/product/10.2.0/db_1 \



[2006-09-27 11:40:47] [EMAIL PROTECTED]

Yes, with your code I get valid Unicode data I inserted before.
Please try to run it in console (but don't forget to set NLS_LANG
first).



[2006-09-27 11:31:39] masui at emplex dot co dot jp

Can your CLOB data be returned by reproduce code correct?



[2006-09-27 11:25:29] [EMAIL PROTECTED]

So, what's the problem then?



[2006-09-27 11:15:38] masui at emplex dot co dot jp

Yes, your CLOB DATA is correct.

I tested for Japanease UTF-8.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/38972

-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1


#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

Yes, with your code I get valid Unicode data I inserted before.
Please try to run it in console (but don't forget to set NLS_LANG
first).


Previous Comments:


[2006-09-27 11:31:39] masui at emplex dot co dot jp

Can your CLOB data be returned by reproduce code correct?



[2006-09-27 11:25:29] [EMAIL PROTECTED]

So, what's the problem then?



[2006-09-27 11:15:38] masui at emplex dot co dot jp

Yes, your CLOB DATA is correct.

I tested for Japanease UTF-8.



[2006-09-27 11:02:44] [EMAIL PROTECTED]

...which is exactly what you posted earlier:
"My CLOB data in Oracle is
"�Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã"."



[2006-09-27 11:01:55] [EMAIL PROTECTED]

This is what I get back when I insert
UTL_RAW.CAST_TO_VARCHAR2('A3B0A3B1A3B2A3B3A3B4A3B5A3B6A3B7A3B8A3B9'):

string(40)
"�Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã"




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/38972

-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1


#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

So, what's the problem then?


Previous Comments:


[2006-09-27 11:15:38] masui at emplex dot co dot jp

Yes, your CLOB DATA is correct.

I tested for Japanease UTF-8.



[2006-09-27 11:02:44] [EMAIL PROTECTED]

...which is exactly what you posted earlier:
"My CLOB data in Oracle is
"�Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã"."



[2006-09-27 11:01:55] [EMAIL PROTECTED]

This is what I get back when I insert
UTL_RAW.CAST_TO_VARCHAR2('A3B0A3B1A3B2A3B3A3B4A3B5A3B6A3B7A3B8A3B9'):

string(40)
"�Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã"




[2006-09-27 11:00:23] [EMAIL PROTECTED]

Just insert plain Unicode data and select it from the table.



[2006-09-27 10:53:44] masui at emplex dot co dot jp

I set NLS_LANG in /usr/local/apache2/bin/envvars.

Following is my setting.
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export NLS_LANG=.AL32UTF8
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_PRELOAD=$ORACLE_HOME/lib/libclntsh.so.10.1

I tested by access from web browser.

Following is create table and insert data.
CREATE TABLE LOBTEST (
LOBDATA  CLOB
);
insert INTO LOBTEST VALUES
(UTL_RAW.CAST_TO_VARCHAR2('A3B0A3B1A3B2A3B3A3B4A3B5A3B6A3B7A3B8A3B9'));



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/38972

-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1


#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

Just insert plain Unicode data and select it from the table.


Previous Comments:


[2006-09-27 10:53:44] masui at emplex dot co dot jp

I set NLS_LANG in /usr/local/apache2/bin/envvars.

Following is my setting.
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export NLS_LANG=.AL32UTF8
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_PRELOAD=$ORACLE_HOME/lib/libclntsh.so.10.1

I tested by access from web browser.

Following is create table and insert data.
CREATE TABLE LOBTEST (
LOBDATA  CLOB
);
insert INTO LOBTEST VALUES
(UTL_RAW.CAST_TO_VARCHAR2('A3B0A3B1A3B2A3B3A3B4A3B5A3B6A3B7A3B8A3B9'));



[2006-09-27 10:04:45] [EMAIL PROTECTED]

How did you set NLS_LANG? How do you test it?

>Broken is only 64bit Linux only, 32bit linx is ok.
I'm testing on 64bit host and it works perfectly fine with
Oracle10g/UTF8.



[2006-09-27 09:56:36] masui at emplex dot co dot jp

Yes, I set ".AL32UTF8" to NLS_LANG.

My CLOB data in Oracle is "Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã".

Broken is only 64bit Linux only, 32bit linx is ok.



[2006-09-27 09:15:34] [EMAIL PROTECTED]

Cannot reproduce.
Make sure your NLS_LANG is set and equals to something similar to
".AL32UTF8".



[2006-09-27 07:59:54] masui at emplex dot co dot jp

Description:

OCI-Lob->load returns broken character or nothing in php 5.2.0RC4.
It is occurred in 64bit linux, in 32bit linux OCI-Lob->read returns
correct multibyte string.

My Oracle database is R10.2.0.2.0, charset is AL32UTF8.

Downgrading to php 5.2.0RC1, it works correct, so this might be bug.

Best regards
Hideaki Masui

Reproduce code:
---
$conn = oci_connect('scot', 'tiger', 'xxx');
if (!$conn) exit;

$query = 'SELECT LOBDATA FROM LOBTEST';

$stid = oci_parse($conn, $query);
if (!$stid) exit;

$r = oci_execute($stid, OCI_DEFAULT);
if (!$r)  exit;

while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {

  echo $row['LOBDATA']->load() ."\n";

}

oci_close($conn);

Expected result:

The "echo $row['LOBDATA']->load();" line should return
the actual mulitibyte string from the select statement.


Actual result:
--
$row['LOBDATA']->load() returns broken character or nothing.






-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1


#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

How did you set NLS_LANG? How do you test it?

>Broken is only 64bit Linux only, 32bit linx is ok.
I'm testing on 64bit host and it works perfectly fine with
Oracle10g/UTF8.


Previous Comments:


[2006-09-27 09:56:36] masui at emplex dot co dot jp

Yes, I set ".AL32UTF8" to NLS_LANG.

My CLOB data in Oracle is "Zˆê“ñŽOŽlŒÜ˜ZŽµ”ª‹ã".

Broken is only 64bit Linux only, 32bit linx is ok.



[2006-09-27 09:15:34] [EMAIL PROTECTED]

Cannot reproduce.
Make sure your NLS_LANG is set and equals to something similar to
".AL32UTF8".



[2006-09-27 07:59:54] masui at emplex dot co dot jp

Description:

OCI-Lob->load returns broken character or nothing in php 5.2.0RC4.
It is occurred in 64bit linux, in 32bit linux OCI-Lob->read returns
correct multibyte string.

My Oracle database is R10.2.0.2.0, charset is AL32UTF8.

Downgrading to php 5.2.0RC1, it works correct, so this might be bug.

Best regards
Hideaki Masui

Reproduce code:
---
$conn = oci_connect('scot', 'tiger', 'xxx');
if (!$conn) exit;

$query = 'SELECT LOBDATA FROM LOBTEST';

$stid = oci_parse($conn, $query);
if (!$stid) exit;

$r = oci_execute($stid, OCI_DEFAULT);
if (!$r)  exit;

while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {

  echo $row['LOBDATA']->load() ."\n";

}

oci_close($conn);

Expected result:

The "echo $row['LOBDATA']->load();" line should return
the actual mulitibyte string from the select statement.


Actual result:
--
$row['LOBDATA']->load() returns broken character or nothing.






-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1


#38972 [Opn->Fbk]: OCI-Lob->loa return broken character

2006-09-27 Thread tony2001
 ID:   38972
 Updated by:   [EMAIL PROTECTED]
 Reported By:  masui at emplex dot co dot jp
-Status:   Open
+Status:   Feedback
 Bug Type: OCI8 related
 Operating System: linux
 PHP Version:  5.2.0RC4
 New Comment:

Cannot reproduce.
Make sure your NLS_LANG is set and equals to something similar to
".AL32UTF8".


Previous Comments:


[2006-09-27 07:59:54] masui at emplex dot co dot jp

Description:

OCI-Lob->load returns broken character or nothing in php 5.2.0RC4.
It is occurred in 64bit linux, in 32bit linux OCI-Lob->read returns
correct multibyte string.

My Oracle database is R10.2.0.2.0, charset is AL32UTF8.

Downgrading to php 5.2.0RC1, it works correct, so this might be bug.

Best regards
Hideaki Masui

Reproduce code:
---
$conn = oci_connect('scot', 'tiger', 'xxx');
if (!$conn) exit;

$query = 'SELECT LOBDATA FROM LOBTEST';

$stid = oci_parse($conn, $query);
if (!$stid) exit;

$r = oci_execute($stid, OCI_DEFAULT);
if (!$r)  exit;

while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {

  echo $row['LOBDATA']->load() ."\n";

}

oci_close($conn);

Expected result:

The "echo $row['LOBDATA']->load();" line should return
the actual mulitibyte string from the select statement.


Actual result:
--
$row['LOBDATA']->load() returns broken character or nothing.






-- 
Edit this bug report at http://bugs.php.net/?id=38972&edit=1