|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-21 23:14 UTC] sniper@php.net
[2005-09-29 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 18:00:01 2025 UTC |
Description: ------------ I want to put and get binary data to column type of binary BLOB (not Smart BLOB). When I put binary data that contain bytes with ASCII code between 127-255 into BLOB column and after this I get this same data from this same BLOB column this data are changed. These changes are probably same as changes for codepages transformation. My aplication works in Slovak locales. When I put binary data into this BYTE column from PC by MS Access and get by php function ifx_get_blob the data was correct. Reproduce code: --------------- <?php // creating persistent connection to Informix ver 10.0 // lines deleted $upfile='//usr//local//apache//htdocs//test//upload//asci_input.txt'; echo $upfile.'<BR>'; $blobid = ifx_create_blob(1, 1, $upfile); $blobidarray[] = $blobid; $resid = ifx_query ("INSERT INTO test (ID, OBJEKT) VALUES(0,?)", $link, $blobidarray); if (! $resid) { // echo ".... Error messages ..."; die; } $sqlca = ifx_getsqlca ($resid); $serial_value = $sqlca["sqlerrd1"]; $resid = ifx_query ("SELECT * FROM test WHERE ID='$serial_value'", $link); $row = ifx_fetch_row ($resid, "NEXT"); $obsah = ifx_get_blob($row[objekt]); $fp = FOpen("//usr//local//apache//htdocs//test//upload//asci_output.txt", "wb+") or die("I can not create file"); FWrite($fp, $obsah); Fclose($fp); ?> Expected result: ---------------- I except that ascii_input.txt and ascii_output.txt have to have same content. Actual result: -------------- Content of ascii_input.txt and ascii_output.txt is different. Bytes with ascii codes are changed.