|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-07-20 20:16 UTC] andresblanco at gmail dot com
[2014-03-03 18:59 UTC] rahulpriyadarshi@php.net
-Assigned To:
+Assigned To: rahulpriyadarshi
[2014-03-03 18:59 UTC] rahulpriyadarshi@php.net
[2016-02-07 15:42 UTC] rahulpriyadarshi@php.net
-Assigned To: rahulpriyadarshi
+Assigned To: vnkbabu
[2016-05-12 06:44 UTC] vnkbabu@php.net
-Status: Assigned
+Status: Not a bug
[2016-05-12 06:44 UTC] vnkbabu@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 05:00:01 2025 UTC |
Description: ------------ The driver is chopping some values of the return strings. It's like special characters counts double. If a column 'name' has type varchar(2) and the value of name is 'áa' the value returned when queried is 'á' instead of 'áa'. If i resize the column to varchar(3) the result is correct. Below I attach a short script to reproduce the bug. I included the dsn so you can see the encoding settings Test script: --------------- $dsn = "informix:database=base;server=ol_server;host=192.168.123.123;client_locale=en_us.utf8;db_locale=en_us.819;service=1526;protocol=olsoctcp;EnableScrollableCursors=1"; $db = new \PDO($dsn, 'user', 'pass'); $db->exec("CREATE TABLE ticket82 ( name VARCHAR(2) );"); $db->exec("INSERT INTO ticket82 VALUES ('aa');"); $statement = $db->query("select name from ticket82;"); $value = $statement->fetchAll(\PDO::FETCH_ASSOC); echo "expected 'aa' got '{$value[0]['NAME']}'\n"; $db->exec("update ticket82 set name='áa';"); $statement = $db->query("select name from ticket82;"); $value = $statement->fetchAll(\PDO::FETCH_ASSOC); echo "expected 'áa' got '{$value[0]['NAME']}'\n"; $db->exec("ALTER TABLE ticket82 MODIFY (name varchar(3));"); $statement = $db->query("select name from ticket82;"); $value = $statement->fetchAll(\PDO::FETCH_ASSOC); echo "expected 'áa' got '{$value[0]['NAME']}'\n"; $db->exec("DROP TABLE ticket82;"); Expected result: ---------------- expected 'aa' got 'aa' expected 'áa' got 'áa' expected 'áa' got 'áa' Actual result: -------------- expected 'aa' got 'aa' expected 'áa' got 'á' expected 'áa' got 'áa'