|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8361 Chinese char changed & ADODB.command,recordset can not be used
Submitted: 2000-12-21 13:52 UTC Modified: 2001-02-26 05:02 UTC
From: steeven at kali dot com dot cn Assigned: phanto (profile)
Status: Closed Package: COM related
PHP Version: 4.0.3pl1 OS: windows98/me
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
38 - 1 = ?
Subscribe to this entry?

 [2000-12-21 13:52 UTC] steeven at kali dot com dot cn
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->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
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-29 17:17 UTC]
this should be fixed in cvs

please try a snapshot from and give me feedback.
 [2001-02-02 13:07 UTC]
could someone with a chinese charset try this please.
 [2001-02-04 00:33 UTC] steeven at kali dot com dot cn
I donwload 4.05dev from, and run the following code:

$dbc = new COM("ADODB.Connection");
$dbc->Provider = "sqloledb";
$q="select title from css";
Here is the result:

Warning: Error in php_char_to_OLECHAR() in d:\apache\htdocs\magway\phorum\test.php on line 4

Warning: Invalid ProgID: ???ַ?????Ч[invalid class string(by me)] in d:\apache\htdocs\magway\phorum\test.php on line 4

Fatal error: Call to undefined function: open() in d:\apache\htdocs\magway\phorum\test.php on line 6

Please tell me what you need to know for more.
 [2001-02-04 06:34 UTC]
which operating system do you use ?

if you're using windows nt/98/95 and the sources where compiled on win2k this could be the reason. i fix this in the evening.

 [2001-02-04 08:25 UTC] steeven at kali dot com dot cn
thanks! I use WindowsMe(chinese).

I don't know which platform they used to compile php.

please let me know if you finished. thanks!

 [2001-02-06 19:28 UTC]
fixed in cvs

you have to wait till they recompile it
 [2001-02-23 20:23 UTC] steeven at kali dot com dot cn
Thank you very very much! finally complied the new version,
Every think worked well now :)

 [2001-02-23 20:29 UTC]
Fixed in CVS, so closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 21:01:29 2024 UTC