I have this code
String s = null;
s = "somevalue";
BASE64Encoder encoder = new BASE64Encoder();
String encoded = encoder.encodeBuffer(s.getBytes());
The value returned has a carriage return, so when i insert this value into a db table and do a select where clause the value isn't picked up as the select statement looks like this
select * from table where encoded = 'fklgjfjglfjklgjf'
But if i do this
select * from table where encoded = 'fklgjfjglfjklgjf
Can anyone tell me how i get rid of the carriage return ?