Hi,

It's probably due to an encoding issue.
See http://www.thescripts.com/forum/thread18557.html

Xavier

[EMAIL PROTECTED] a écrit :
> Hi,
> I have a ResultSet. When I call getString(1) on it, I get back the
> String I expect. However, when I call getBytes and convert it to a
> String, I dont get back the String I expect, whether I use BIG_ENDIAN
> or LITTLE_ENDIAN. I dont see why there is a difference?
>
>
> byte[] abc = lBaseFileResultSet.getBytes(1);
>
> which gives
>
> byte[] "abc"= byte[16] (id=18)
> byte [0]= -80
> byte [1]= -18
> byte [2]= 65
> byte [3]= 11
> byte [4]= 109
> byte [5]= 0
> byte [6]= 98
> byte [7]= 0
> byte [8]= 105
> byte [9]= 0
> byte [10]= 97
> byte [11]= 0
> byte [12]= 110
> byte [13]= 0
> byte [14]= 95
> byte [15]= 0
>
> or byte[] cba = lBaseFileResultSet.getString(1).getBytes();
>
> which gives
>
> byte[] "cba"= byte[16] (id=20)
> byte [0]= 115
> byte [1]= 121
> byte [2]= 109
> byte [3]= 98
> byte [4]= 105
> byte [5]= 97
> byte [6]= 110
> byte [7]= 95
> byte [8]= 115
> byte [9]= 101
> byte [10]= 99
> byte [11]= 117
> byte [12]= 114
> byte [13]= 105
> byte [14]= 116
> byte [15]= 121
> which is correct
>
> Thanks
>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLiteJDBC" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlitejdbc?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to