Java get方式中文传参

将一个中文utf-8编码的中文参数传递到servlet并打印

示例代码:

String content = request.getParameter("content");

content = new String(content.getBytes("ISO-8859-1"), "UTF-8");

打印content能正常显示

你可能感兴趣的:(Java get方式中文传参)