Bug #54421 [NEW]: bindValue does not process utf-8 encoded strings.
From:
Operating system: Found on win and linux(centos)
PHP version: 5.3.6
Package: PDO related
Bug Type: Bug
Bug description:bindValue does not process utf-8 encoded strings.
Description:
------------
I'm currently developing a piece of software system for a Russian client.
When set names is set as utf8 in both execute and as one of the options in
the PDO construct, no results are returned when a utf8 string is bound
using bindValue();
Test script:
---------------
$stmt = $pdo->prepare('SELECT * FROM table WHERE column LIKE ?');
$stmt->bindValue(1,\'%пÑивеÑ%\');
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
var_dump($result);
Expected result:
----------------
array(1) { "column" => "пÑивеÑ" }
Actual result:
--------------
array(0){}
--
Edit bug report at http://bugs.php.net/bug.php?id=54421&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54421&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54421&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54421&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54421&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54421&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54421&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54421&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54421&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54421&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54421&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54421&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54421&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54421&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54421&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54421&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54421&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54421&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54421&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54421&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54421&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54421&r=mysqlcfg
Thread (4 messages)
- will dot skates at ntlworld dot com