Bug #40664 [Com]: String conversion functions wrong for multibyte chars
| From: | fjortiz at comunet dot es | Date: | Thu, 17 Jul 2014 07:09:54 +0000 |
| Subject: | Bug #40664 [Com]: String conversion functions wrong for multibyte chars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186683@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
Comment by: fjortiz at comunet dot es
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:
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.
Previous Comments:
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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