Subject Re: UTF8, malformed string error
Author Milan Babuskov
Roman Rokytskyy wrote:
>>Right, so in the case above, I'm getting a normal string in my
>>TField definitions because Firebird translated it for me.
> Correct. You have told Firebird to convert data into ISO-8859-1
> encoding, which happens to be your default encoding on your Windows
> computer (Control Panel->Regional Settings->Extended tab->Language
> for non-Unicode programs). Therefore they were correctly displayed
> by Windows. But if you would do that having the Russian regional
> settings in Windows, you will see the different character.

We had similar problem when we added UTF8 support to FlameRobin. In
the end we made all the strings that Firebird return translate from
the connection character set to system (Windows/Linux/whatever)
character set. And of course, the other way around when sending data
to Firebird.

wxWidgets library we're using has a way to read what is the system
character set and also to convert between various character sets. I
suppose something like that should exist for Delphi as well?

In any case, it should be task for database-communitaction layer, i.e.
IBO to use those facilities and give you the string converted to
system character set.

Milan Babuskov