Subject Re[2]: [Firebird-Java] Charset
Author Marczisovszky Daniel
>> Is there any way to specify charset when connecting to a database.
>> Interclient supported it with a "charSet" property.

AAA> I added charset support on the client side to CVS yesterday.
AAA> Update your code from CVS.

AAA> It does not work with a property. The driver will select
AAA> automatically the charSet depending on the default
AAA> encoding of the Java Virtual Machine on your platform.
AAA> Currently it auto-selects the ISO8859_1 (ISO-8859-1) and
AAA> win1252 (Cp1252) charSets. Other mappings should be added to
AAA> FBManagedConnectionFactory class.

Hm... You'll think I don't like anything... Yesterday the Blobs, today
this feature. So: I live in Hungary, and the only working collate
order is PXW_HUNDC with character set WIN1250. We're using English
Windows and English Linux. Even if I change to a Hungarian Windows
our charset will be ISO-8859-2, not WIN1250. Moreover this way I won't
be able to use two databases with different character sets.

Without WIN1250, Firebird is simply useless for me. This support was
a really important reason for our choice over Postgres and MySQL.
ISO-8859-2 *does not* have a collate for the Hungarian language.

AAA> If you need another charSet, send me the output of the
AAA> System.getProperty("file.encoding") on your platform with
AAA> the corresponding Firebird charSet. And I will add it
AAA> to the driver. Example:

AAA> System.getProperty("file.encoding") --> ISO-8859-1
AAA> Firebird character set --> ISO8859_1

AAA> I think that is better to select the charSet automatically
AAA> and don't bother about setting any property.

Well, as you see, my opinion about this case is such an automatic
feature may not be the best solution.

If I can "hack in" a property which specifies the charset, is it
possible that this would be added to the "official" driver?

Best wishes,
Daniel