Subject | Re: [Firebird-Java] Re: Java CharSet to Firebird CharSet |
---|---|
Author | Mark Rotteveel |
Post date | 2012-08-14T11:44:42Z |
On Tue, 14 Aug 2012 11:25:17 -0000, "the_a_rioch" <ariochthe@...>
wrote:
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.
Mark
wrote:
>> But you are free to ignore the recommendation.is
>
> 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 beonly
> 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.
Mark