java - Android read file encoding issue -


I am trying to read a file from the SD card and I have been told this in Unicode format. However, when I try to read the file, I get the following:

encoded file

This is the file that I am using to read the file:

  InputStreamReader fw = New InputStreamReader (New FileInputStream (root.getAbsolutePath () + "/ Drive / SDK / Cmd.62.out"), "UTF-8"); Four [] buf = new cell [255]; Fw.read (buf); String watch string = new string (buff); Log.d ("courierread", readString); Fw.close ();   

If I type that output in a file, then I get it when I open it in the hex editor:

text "itemprop =" text ">

< S> What's in the file? In that case

Edit (from the comment) : It looks like the small-endian UTF-16 for me, try the charset "UTF-16LE".

Comments