Subject Character Set question (practical & philosophical)
Author John Craig
Hi Folks,

I'm trying to understand one issue RE the charset handling that's not
quite clear from the excellent FAQs that come with JayBird. I find this:

"You must also open the connection to the database with lc_ctype set
to the same character set as the database for character translations
to work properly."

And, this:

"Also, the Firebird server attempts to transliterate the internal
charset of a database to the charset specified in the connection.
JayBird also attempts to translate the JVM charset to the Firebird
server charsets specfied in the connection."

What's not clear is what charset is specified by default in the
connection if I leave off the lc_ctype parameter....

I'm anxious to be able to have my code work correctly with whatever
the native charset is of various DB's (leaving aside the issue of
column-by-column settings which seem like a headache I'll just ignore!).

Since it's possible to query the database to determine what it's
native charset is, wouldn't it be feasible for JayBird to use that as
its default when it makes the connection? (Perhaps it'd actually have
to connect once to find out the charset and then close and reopen with
the correct one, but this could be specified with a reserved name like
"USEDBCHARSET" or something else.) At the moment, I'm basically faced
with having to do the connect, read the charset, close, reconnect with
right charset drill from outside the driver. It seems like the driver
COULD do that, right????

Thanks any suggestions or insight appreciated!

John