Subject | Re: Problem While Reading BLOB OBJECT-Jaybird Driver - binary to char conversion. |
---|---|
Author | Roman Rokytskyy <rrokytskyy@acm.org> |
Post date | 2003-02-11T10:16:49Z |
Hi,
(int) will correctly handle charset encoding issues and give you back
a correct string.
If you do want to use byte[], rs.getBytes(int) does exactly this.
Then you can create new string (note, encoding of bytes might be
different from default encoding of your JVM, you must use encoding
corresponding to lc_ctype property of your connection). So, if you
want to avoid all these complications, use rs.getString(int)
Best regards,
Roman Rokytskyy
> Why make things difficult. Simply get the blob data by callingCompletely agree with William. In addition to simplicity rs.getString
>
> resultSet.getString();
>
> It has always worked for me. Or you can get it in another data type
> and convert it to a string.
(int) will correctly handle charset encoding issues and give you back
a correct string.
If you do want to use byte[], rs.getBytes(int) does exactly this.
Then you can create new string (note, encoding of bytes might be
different from default encoding of your JVM, you must use encoding
corresponding to lc_ctype property of your connection). So, if you
want to avoid all these complications, use rs.getString(int)
Best regards,
Roman Rokytskyy