Subject Re: [firebird-support] UTF8 database and extended characters in metadata
Author Martijn Tonies
Hello Adriano,

> > Right, I've just experimented with sending SQL as UTF8 to Firebird
> > when the database is UTF8
>
> Database charset is used *only* when you are creating fields or
> parameters without an explicit charset.
>
> > and that seems to work, including table
> > names and so on. Would this be the correct way to go then?
>
> It depends on what is "SQL as UTF8". Encoded in UTF-8? Then yes, if you
> use UTF8 connection charset.

Yes, I'm now encoding and decoding (exceptions/plans) when using
UTF8 as both the connection and database default charactersets. When
I use the table as in my first example, I can browse it, extract it's DDL
and I get the correct plan (or exception when I modify the name in the
SQL).

When I'm using Win1252 as the connection charset, I'm not doing the
encode/decode.

Would this be correct and "as expected" for Firebird as well?

> > I'm decoding, for example, SQL Plan and exception messages.
> >
> Plans are transliterated to the connection charset since v2.1 or v2.5, I
> don't remember. Exceptions are only transliterated when you use dynamic
> texts (i.e., exception x 'text'), because stored text is in NONE charset.
>
> > Should I also do value decoding or is that handled by the OS/Firebird
> > client?
> >
> It should be automatically be in the connection charset.


Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Sybase
SQL Anywhere, Oracle & MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com