Steve Boyd wrote:
> I have a database that is configured with CharSet = None. > My clients access it with CharSet = UTF8. I would not actually have > know this if I hadn't started digging into this problem. My > assumption was always that the clients were CharSet = None but > something in the IBObjects component suite seems to change this to > UTF8 when the database is opened. But that is a different issue. No, it IS your issue. The TIB_Connection component has a property CharSet. If this is set to a character set that is incompatible with the database character set, you will get the malformed string error whenever the parser encounters a character in the input that is not supported in the database character set. It's quite possible that IBO now defaults the client charset to UTF8, since Delphi began supporting it a few versions ago. Check that property in your application code. Character set NONE is a bare-bones ASCII set and does not provide intrinsic support for any characters beyond the 128 characters that provide the US-Ascii upper and lower case, numerals and the basic diacritic symbols. You can store anything in charset NONE but nothing in the least useful can be done with those incompatible characters. > Recently we started receiving data with non English characters. The > data is stored into the database correctly. The data can be > retrieved from the database correctly UNLESS I try concatenate a > field with non English characters with other fields. Suppose the > field CTE_CITY has a non English character. The following will fail > with error 335544849 - 'malformed string'. Right, so concatenating a chunk of 2 or more bytes (some character not present amongst those first 128 characters) would form a nonsensical string. The parser knows that, so you get that exception. > CTE_CITY || ',' || CTE_STATE > I can retr ieve those fields into my program individually and > concatenate them in the program with no problem. Which no doubt means your program is operating with Unicode characters, while your database can only make sense of US ascii. > Is this a bug or simply something I don't understand? Well, it isn't a bug. ;-) Helen --- This email has been checked for viruses by AVG. https://www.avg.com
