servlet代码:
BufferedInputStream in = new BufferedInputStream(request.getInputStream());
byte[] b = new byte[1024];
StringBuilder sb_utf = new StringBuilder(64);
int i=0;
do {
i = in.read(b);
if (i > 0) {
sb_utf.append(new String(b, 0, i,"UTF-8"));
}
} while(i == 1024);
------解决方案-------------------- post 怎么会是这种编码方式 你这怎么像是get方式 你用base64解码试试
------解决方案-------------------- //用这个读中文 试试 BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream()));
------解决方案-------------------- 先调用request.setCharacterEncoding("gb2312");再说
------解决方案-------------------- requet.setCharacterEncoding("gb2312"); BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream(),"gb2312"));