Edit report at https://bugs.php.net/bug.php?id=40664&edit=1

 ID:                 40664
 Comment by:         ddowns at online-access dot com
 Reported by:        fjortiz at comunet dot es
 Summary:            String conversion functions wrong for multibyte
                     chars
 Status:             Assigned
 Type:               Bug
 Package:            COM related
 Operating System:   Win32
 PHP Version:        5.2.1
 Assigned To:        pajoye
 Block user comment: N
 Private report:     N

 New Comment:

I went to apply the patch and its already there in 5.3.18. Not sure when this 
was 
actually solved but the bug status needs updating.


Previous Comments:
------------------------------------------------------------------------
[2012-08-08 07:24:29] sager at agitos dot de

The patch is still missing in PHP 5.3.15 (I don't know why, the patch is 
working: thanks to fjortiz!)

So I compiled php_com_dotnet.dll that is compatible to 
http://windows.php.net/downloads/releases/php-5.3.15-nts-Win32-VC9-x86.msi

Download this compiled dll at 
http://www.agitos.de/pub/php-5.3.15-com_dotnet-patch.zip

------------------------------------------------------------------------
[2010-08-01 17:45:49] ivars_ju at inbox dot lv

Hi,
i still have this bug in PHP Version 5.3.3

Is it so hard to commit this?

------------------------------------------------------------------------
[2009-10-20 10:50:13] paj...@php.net

taking the hand on this one.

------------------------------------------------------------------------
[2009-10-20 10:36:01] fjortiz at comunet dot es

after 2,5 years, can someone just commit the patch I provided to cvs?. It's 
annoying to recompile any PHP version that comes out just for the sake of this 
nonsense. Take into account that any use of PHP+COM+multibyte stuff fails 
without this silly fix.

Thank you.

------------------------------------------------------------------------
[2009-03-22 10:12:22] j dot novak at netsystem dot cz

I see same problem with ADODB.Connection and it's parameters.
When I use:

// init connection to DB
$dbc = new COM('ADODB.Connection',null,CP_UTF8);
$dbc->Open("PROVIDER=MSDASQL;Driver={SQL 
Server};Server=192.168.210.1;Database=test;UID=test;PWD=test");
// create command
$oCmd = new COM('ADODB.Command',null,CP_UTF8);
$oCmd->ActiveConnection = $dbc; // 
// Table test1 has one row c1 of type nvarchar(200)
$oCmd->CommandText = "INSERT INTO test1(c1) VALUES (?)";
$oCmd->CommandType = 1;
// Some UTF-8 string (length in characters is 15, 24 in bytes)
$val='ABCříšúěďáéóXYZ';
$len=strlen($val);
$p=$oCmd->CreateParameter('name',202,1,$len,$val);
$oCmd->Parameters->Append($p);
$oCmd->Execute();
// ADODB sends to DB nvarchar(24) which is length of string
// in bytes not characters, but data has 15 characters
// in UCS-2. So in database there is correct string, but there is
// some garbage after end of string

------------------------------------------------------------------------


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

    https://bugs.php.net/bug.php?id=40664


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

Reply via email to