Subject Re: [Firebird-Java] Re: Java CharSet to Firebird CharSet
Author Mark Rotteveel
On Tue, 14 Aug 2012 11:25:17 -0000, "the_a_rioch" <ariochthe@...>
>> But you are free to ignore the recommendation.
> Pity, he is few weeks late to our bashing ;-)
> But will NONE be used with strings ? Wasn't there kind of consensus that
> Java Strings cannot be without encoding, and raw byte arrays like OCTET
> to be used for explicit NONE encoding ?

We need to return Strings to be JDBC compliant. So the type of the column
will still be Types.CHAR or Types.VARCHAR and the ResultSet.getObject()
methods will return a String (converted using the default OS charset).
However if you want to get the actual bytes you can simply use the
ResultSet.getBytes() methods, which will return the original bytes as
received from the server.

> What i remembered from our arguing, is that Java String would always be
> transcoding, and if topic starter wants data binary-wise "as is", he
> would have an option to read VarChars and Blobs into byte arrays ?

See above.