PHP 4.0 Bug #8361: Chinese char changed & ADODB.command,recordset can not be used
| From: | steeven at kali dot com dot cn | Date: | Thu, 21 Dec 2000 18:52:13 +0000 |
| Subject: | PHP 4.0 Bug #8361: Chinese char changed & ADODB.command,recordset can not be used | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42068@lists.php.net to get a copy of this message | ||
From: steeven@kali.com.cn
Operating system: windows98
PHP version: 4.0.3pl1
PHP Bug Type: COM related
Bug description: Chinese char changed & ADODB.command,recordset can not be used
I have setup PHP to work with ADO, but they would't work:
$dbc = new COM("ADODB.Connection");
$dbc->Provider = "sqloledb";
$dbc->Open('DSN=starmate;Database=magway;UID=sa;PWD='); //OK
$q="select title from css";
//1. command object
$cm= new COM("ADODB.Command");
$cm->CommandText=$q;
$cm->ActiveConnection=$dbc; //PropPut() failed!!!
$rs=$cm->Execute(); //Invoke() failed!!!
//
//2. recordset still don't work
$rs=new COM("ADODB.Recordset");
$rs->Open($q); //Invoke() failed!!!
//only this code will work
$rs=$dbc->Execute($q);
echo $rs->fields[0]->value . "<br>";
On the other hand, all the Double byte char input/output will be cut to 1byte. ²âÊÔa will be
changed to 3 byte char.
Test with ADODB,Word, It seemed that windows report chinese as one char, but php think it one byte.
--
Edit Bug report at: http://bugs.php.net/?id=8361&edit=1