小林制药脚气膏好用吗:jsp中的代码转换问题,高手请进

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/01 22:00:45
我进行了一次代码转换,
string name=request.getParameter("name");
name=new String(name.getBytes("ISO8859_1"),"GBK");
我输的是六个汉字,显示的为什么是??????

在最上方加上<%@ page contentType="text/html; charset=gb2312" %>就OK了

在页面里加入
<%@ page contentType="text/html; charset=gb2312" %>

把GBK换成GB2312试试。

GB2312是对GBK的升级,GBK是GB2312的一个子集。