你的wtp是什么?PreparedStatement类的对象的executeUpdate()返回的好像是整形的数值,
因为编码方式的不同会出现乱码问题,你可以用java.lang包的String类的构造方法String(byte[] bytes, String enc)来加以转换。参考以下解释:String
public String(byte[] bytes,
String enc)
throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
因为编码方式的不同会出现乱码问题,你可以用java.lang包的String类的构造方法String(byte[] bytes, String enc)来加以转换。参考以下解释:String
public String(byte[] bytes,
String enc)
throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported
String idd= new String(request.getParameter("T1").getBytes("8859_1"),"gb2312");