Subject | Re: [Firebird-Java] Re: Java CharSet to Firebird CharSet |
---|---|
Author | Mark Rotteveel |
Post date | 2012-08-13T07:55:05Z |
On Sun, 12 Aug 2012 19:38:46 -0000, "Fabiano"
<fabiano@...>
wrote:
UTF-16, but that is (almost always) irrelevant to you as a developer in
Java. The reason that Java has a 'default' characterset linked to the
characterset of the OS is mostly a leftover from Java 1.0.
When using Jaybird you could always connect using UTF8, however that can
be a bit wasteful if your database uses a specific single byte characterset
as you are more likely to send and receive more bytes compared to using the
specific characterset. However if you need the full gamma of Unicode
characters, then you are better off using UTF8 always (and your database
should too).
Mark
<fabiano@...>
wrote:
> It is done, Mark.that
>
> http://tracker.firebirdsql.org/browse/JDBC-267
>
> BTW, is it correct to connect to Firebird using always the "UTF-8"
> charset, independent of the charset used by the O.S? I read somewhere
> despite the charset the O.S is using, Java always use UTF-16, and itwill
> doesn´t matter if i connect with ISO-8859-1, UTF-8 or other, jaybird
> always convert from UTF-16 (Java) to connection charset "before" sendingJava uses the unicode characterset, and in memory that is encoded as
> something to the server.
UTF-16, but that is (almost always) irrelevant to you as a developer in
Java. The reason that Java has a 'default' characterset linked to the
characterset of the OS is mostly a leftover from Java 1.0.
When using Jaybird you could always connect using UTF8, however that can
be a bit wasteful if your database uses a specific single byte characterset
as you are more likely to send and receive more bytes compared to using the
specific characterset. However if you need the full gamma of Unicode
characters, then you are better off using UTF8 always (and your database
should too).
Mark