try:String sSourceString;
byte[] baByteArray = sSourceString.getBytes("GBK");
String sResult = new String(baByteArray,"ISO-8859-1");
byte[] baByteArray = sSourceString.getBytes("GBK");
String sResult = new String(baByteArray,"ISO-8859-1");
调试欢乐多
byte[] baByteArray = sSourceString.getBytes("ISO-8859-1");
String sResult = new String(baByteArray,"GBK");
byte[] baByteArray = sSourceString.getBytes("ISO-8859-1");
这一行代码,否则都会是?号,只需要在jsp中引入
<%@ page contentType="text/html;charset=gb2312"%>并且在html中引入
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
就可以了,我用的oralce9i,没问题的