Re: [firebird-support] UTF8 database and extended characters in metadata
Author
Martijn Tonies
Post date
2008-11-13T09:58:29Z
----- Original Message -----
From: "Thomas Steinmaurer" <ts@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, November 13, 2008 10:46
Subject: Re: [firebird-support] UTF8 database and extended characters in
metadata
> Hello Martijn,
>
> >> In an UTF8 database ( Fb 2.1 ), trying to create a table via Database
> >> Workbench which uses IBObjects:
> >>
> >> create table "ÅÄÖ"
> >> ( id integer)
> >>
> >> I get:
> >> arithmetic exception, numeric overflow, or string truncation Cannot
> >> transliterate character between character sets
> >>
> >> However, in FlameRobin, this works fine.
...
> >>
> >> But I have the feeling this message is incorrect (wrong firebird.msg?)
> >
> > It seems to be the error message:
> > Malformed string
> >
> > On executing:
> > select rf.rdb$field_name, f.rdb$field_type, f.rdb$field_sub_type,
...
> > rf.rdb$relation_name = 'ÅÄÖ'
> > ORDER BY rf.rdb$field_position ASC
> > , fd.rdb$dimension ASC
> >
> >
> > Additionally, reconnecting with FlameRobin displays the tablename
completely
> > mangled.
>
> The infamous malformed string error message has been discussed in
> several contexts in firebird-devel in the past. See also:
> http://tracker.firebirdsql.org/browse/CORE-1634
>
> I think it is related to using a UTF8 database with UTF8 character set
> at connect time, but without a unicode capable client tool.
>
> What happens, specifying e.g. ISO8859_1 or WIN1252 at connect time, even
> if it is a UTF8 database?
>
> I once switched back from UTF8 to ISO8859_1 for a newly created Firebird
> 2.1 cause of these problems.
Win1251 fails, Win1252 works, ISO8859_1 also works.
When going back to UTF8 as the connection characterset and using UTF8Encode
on the "name", I get:
rf.rdb$relation_name = 'Ã.Ã"Ã-'
And the columns are fetched...
Hmm, should I check to see if it's UTF8 and use the Delphi UTF8Encode
function?