Subject | Re: [IBO] Setting UTF8 strings |
---|---|
Author | Stefan Heymann |
Post date | 2007-02-23T17:10:15Z |
> Is there a reason why IBO doesn't convert strings to UTF8You cannot detect if a normal String/AnsiString (or even Utf8String)
> when assigning them to parameters?
> By default, Delphi "string" or "WideString" isn't UTF8, so
> trying to use them fails horribly when connected to a UTF8
> database or (var)char field.
is UTF-8 or whatever character set. So it's unclear to convert from
what unless you would provide the encoding together with every single
assignment.
However, when a WideString gets assigned to a (var)char field of a
database with a UTF-8 client connection (!) IBO could probably do the
conversion.
I am currently developing an application for Firebird 2.0 that assumes
that the database is created with DEFAULT CHARACTER SET UTF8 and uses
UTF8 as the client connection character set. You must be constantly
aware if a certain string that you are handling in your code is ANSI
(which is the local language character set, WIN1252 here in Western
Europe) or UTF-8. But hey, it works :-)
Best Regards
Stefan