Subject RE: [IBO] Malformed String
Author Svein Erling Tysvær
>I have a database in FB 2.5.2 defined as UTF8. I have added some tables in the 'NONE' format for a historic client application.
>All was working well but I have run into a Malformed String issue reading data back using the following sort of SQL
>
>SELECT COALESCE(a, '') || COALESCE(b, '') AS text FROM tablename
>
>If I change the SQL to
>
>SELECT a || b AS text
>FROM tablename
>
>The query works correctly. I have tried a variety of other SQL statements to work around the issue but any comparison or function
>called on the field causes the error. This problem only happens on certain text (which doesn't appear to have any 'funny' characters.
>
>Any help would be greatly appreciated :)

Have you tried

SELECT COALESCE(cast(a as varchar(<whatever>) character set utf8), '') || COALESCE(cast(b as varchar(<whatever>) character set utf8), '') AS text FROM tablename

and similar (including casting the result back to NONE)?

Does this only happen in IBO or also when using isql or other components? If it is not isolated to IBO, it might be better asking this question to the firebird-support list.

HTH,
Set