I am reading a Unicode CSV file which is getting read using CSVReader reader=new CSVReader(new InputStreamReader(new FileInputStream(in),"UTF-8"),'\t');
now when I print the file contents
The output is in UTF-8 for example : C r e a t e
Now when I try to compare this with normal
String str=new String("CREATE".getBytes(Charset.forName("UTF-8")),"UTF-8"); its not same or equal.
So the question is how to convert or represent a String in UTF-8 format ? str.getBytes(charset) is not doing the job for me as mentioned above.