Subject lc_ctype support
Author rrokytskyy

Seems to me that I have finished the lc_ctype support. It's in CVS,
please update sources. I had problems with testing all that stuff. I
was able to get same results in our driver and InterClient 2.01 for
Ukrainian and German languages. All other languages were not tested.
There's a test case TestFBEncodings, please, use it to test your
languages. Also I would appreciate if youpost test cases here. Then I
will add them to CVS.

How to use it?

Quite simple: you have to set the "lc_ctype" property to correct
InterBase encoding (you can specify also other DPB constants:
GDS.isc_dpb_lc_ctype is "lc_ctype", same applies to all of them).
Note, InterClient uses "charSet" property and Java encodings. Then
pass this property along with others to java.sql.DriverManager. If
you use FBWrappingDataSource, please use setConnectionRequestInfo
(...) method instead.

There is one possible problem: since connection request info now
depends on "lc_ctype", there's no FBManagedConnectionFactory caching
done in FBDriver.connect(...) method. This will slow down things a
little. Also this might have some impact on JCA stuff. David?

Alejandro's code is also there. So, when you do not specify
the "lc_ctype", it will try to select encoding automatically.
Sometimes this might lead to incorrect results, since in InterBase
no "lc_ctype" means encoding "NONE". Therefore, if you want to
have "NONE" encoding set on connecting to database, please specify it

And one more thing: you cannot convert from "NONE" to any other
encodings. This means that you will get SQLException "Cannot
transliterate characters between character sets". FBManager currently
is able to create database only with default character set "NONE".
So, when you connect to database with "WIN1252" for example, store
data into the column with no charset specified, you, most likely,
will not be able to read it back if you connect with lc_ctype other
than "NONE".

Many thanks to Daniel Marczisovszky for Java to InterBase mapping!

Looking forward for your comments.

Best regards,
Roman Rokytskyy