Skip to main content
7 events
when toggle format what by license comment
Sep 19, 2013 at 18:59 history edited Christoffer Hammarström CC BY-SA 3.0
Added the needed encoding parameter.
Nov 25, 2010 at 11:39 comment added Nick H It should be a string such as UTF-8. See download.oracle.com/javase/1.4.2/docs/api/java/nio/charset/… for some standard charsets.
Nov 25, 2010 at 10:21 comment added xydev @Nick also tried String value = new String(byteArray, "charset=utf-8");
Nov 25, 2010 at 10:19 comment added xydev @Nick i am getting an error String value = new String(byteArray, "text/xml; charset=utf-8"); as unsupported encoding exception
Nov 25, 2010 at 10:16 vote accept xydev
Nov 25, 2010 at 9:37 comment added Nick H String(byte[]) uses the system's default encoding. You should use String(byte[], String) to specify an encoding, which depends on what your encoding your bytes are in.
Nov 25, 2010 at 9:32 history answered Sankar Ganesh PMP CC BY-SA 2.5