Bug #40664 [Opn->Dup]: String conversion functions wrong for multibyte chars

From: Date: Mon, 03 Feb 2020 08:55:46 +0000
Subject: Bug #40664 [Opn->Dup]: String conversion functions wrong for multibyte chars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225324@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=40664&edit=1

 ID:                 40664
 Updated by:         cmb@php.net
 Reported by:        fjortiz at comunet dot es
 Summary:            String conversion functions wrong for multibyte
                     chars
-Status:             Open
+Status:             Duplicate
 Type:               Bug
 Package:            COM related
 Operating System:   Win32
 PHP Version:        5.2.1
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

This appears to be a duplicate of bug #66431, which is fixed as of
PHP 5.4.29 and 5.5.13, respectively.


Previous Comments:
------------------------------------------------------------------------
[2014-07-17 07:09:52] fjortiz at comunet dot es

Some update: while working with 5.3.28, it seems to work better now, but there is still a
length-related bug inside.

While inserting from PHP strings with accents or spanish "ñ" char in MSSQL server
through COM driver (utf8 encoded), it seems to insert properly, but if I inspect the last char in
the column I find a "\0" at the last position, which makes all my "=" queries
fail. 

"\0" is the C language string terminator so there is clearly some kind of memory
allocation mismatch in the code. 

Oddly enough queries with "where column='textwithñfails'+char(0)" do work, so
I'll use this trick as a workaround meanwhile.

------------------------------------------------------------------------
[2012-11-06 17:23:33] ddowns at online-access dot com

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.

------------------------------------------------------------------------
[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] pajoye@php.net

taking the hand on this one.

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


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


Thread (15 messages)

« previous php.bugs (#225324) next »