2013年8月19日星期一

Android Ansi string issue

Collect a set of data stored in the serial BYTE Byte buffer , including Chinese , how to do it for strings using String.valueOf () English is no problem, Chinese is garbled
------ Solution --------------------------------------------
need to be encoded , decoding. Both consistent.
------ Solution ---------------------------------------- ----
String s=new String(byte, "编码");

没有评论:

发表评论