|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-02-18 15:38 UTC] logobinder at o2 dot pl
[2013-02-26 14:36 UTC] javier dot sagrera at uk dot ibm dot com
[2013-02-26 16:57 UTC] andreas dot streichardt at 100days dot de
[2013-03-07 11:07 UTC] javier dot sagrera at uk dot ibm dot com
[2014-02-14 10:01 UTC] rahulpriyadarshi@php.net
-Assigned To:
+Assigned To: rahulpriyadarshi
[2014-02-14 10:01 UTC] rahulpriyadarshi@php.net
[2014-02-20 11:34 UTC] rahulpriyadarshi@php.net
[2016-02-07 15:43 UTC] rahulpriyadarshi@php.net
-Assigned To: rahulpriyadarshi
+Assigned To: vnkbabu
[2017-10-05 14:56 UTC] stephane dot gerber at unil dot ch
[2018-11-28 10:44 UTC] as at nsi dot de
[2022-01-27 17:15 UTC] laule at lunis-it dot de
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 14:00:01 2025 UTC |
Description: ------------ We got an old database (SE) with DB_LOCALE=de_DE.cp1252 We are redesigning the frontend to be an UTF-8 webapplication and as the client development kit supports automatic character set conversion we tried setting the CLIENT_LOCALE to de_DE-utf8 Using these settings, conversion is taking place but the affected strings seem to contain corrupted memory! The affected field in the example is a CHAR(40). 120 bytes indicate that it is trying to allocate as many bytes as necessary for a BMP utf-8 char * 40. The problem persists if we switch to a newer Informix online server so the bug seems to be PDO-informix related or even related to the CSDK. CSDK used: /usr/lib/informix/bin/ifx_getversion clientsdk IBM/Informix-Client SDK Version 3.70.UC5DE Copyright (C) 1991-2012 IBM PDO_Informix: 1.3.0 The problem appears when using prepare() as well as when using query(). Test script: --------------- $connection = new PDO('informix:host=172.31.5.122;service=1523;database=/u2/rel6.1.1/test.fir/test;server=se_tis_risc_neu;protocol=sesoctcp;EnableScrollableCursors=1;DB_LOCALE=de_DE.cp1252;CLIENT_LOCALE=de_DE.utf8', 'develop', 'develop'); $stmt = $connection->query("SELECT kd_nr, kd_ans1 FROM kunden WHERE kd_nr=18259"); foreach ($stmt as $row) { var_dump($row); } Expected result: ---------------- The result should not contain any corrupted memory. Actual result: -------------- array(4) { 'KD_NR' => string(5) "18259" [0] => string(5) "18259" 'KD_ANS1' => string(120) "Jörn Möllemann \000\000oc=\000\000\0005\000\000\000SELECT kd_nr, kd_ans1 FROM kunden WHERE kd_nr=18259\000-\000\000\000=\000\000\000�|a\020\005\000\000\000" [1] => string(120) "Jörn Möllemann \000\000oc=\000\000\0005\000\000\000SELECT kd_nr, kd_ans1 FROM kunden WHERE kd_nr=18259\000-\000\000\000=\000\000\000�|a\020\005\000\000\000" } Note that the name has been converted properly (it is valid utf8) but the string is corrupt from character 40 (=field length) on.