PHP, Interbase and text blobs in ISO8859_1

From: Date: Sun, 20 Aug 2000 11:48:43 +0000
Subject: PHP, Interbase and text blobs in ISO8859_1
Groups: php.db 
Request: Send a blank email to php-db+get-2189@lists.php.net to get a copy of this message
Hello. I have a problem with inserting text blobs into Interbase tables. I am using PHP4.0.1PL2 and the open sourced Interbase. I keep getting the error message... Warning: InterBase: conversion error from string "BLOB" in <file> on line <line>. Whenever I try to insert a blob. I create my blob with: $blob = ibase_blob_create(); ibase_blob_add($string); ibase_blob_close($blob); ibase_query("insert into MyTable(textarea) values ($blob)"); I am creating a Swedish site so I need support for the non-ASCII characters in the Swedish character set. Since the default character set for the web is ISO8859_1 and I would be getting form data in that format, it would also be the natural choice for the database. I defined the blob to be of sub_type 1(text), in ISO8859_1, and it is also the default character set for the entire database. I have also tried with blobs being of sub_type 0 (binary) and with text blobs of character set NONE, but with no satisfactory result. Am I doing something wrong here, or is there some old, buggy code somewhere? I am fluent in C, but I don't have enough experience with Interbase's API to find any Interbase-related bugs. Thanks / Johan -- johan@tiq.com -- http://www.obsession.se/johan/ --

« previous php.db (#2189) next »