摘要: 中文字符UTF-8字节长度是:3GBK字节长度是:2java例如:public class TestMain { /** * @param args * @throws UnsupportedEncodingException */ public static void main(String[] args) throws UnsupportedEncodingException { String s = "夏"; System.out.println(s.getBytes("UTF-8").length);// 3 ... 阅读全文
posted @ 2013-05-16 14:39 夏天的森林 阅读(724) 评论(0) 推荐(0) 编辑