一、字符串经base64解码后出现乱码:
String newStr = new String((new BASE64Decoder()).decodeBuffer(oldStr),"utf-8");

二、用response.getWriter().print(xxx)返回的内容有乱码;在该句前面插入:
response.setCharacterEncoding("utf-8");

posted on 2015-06-19 15:15  翼风飞扬  阅读(266)  评论(0编辑  收藏  举报