关于struts+hibernate+mysql5.0乱码问题
e3002 2006-04-22 09:12:03 我在jsp页面中来获得值显示正确,但当执行紧接着的hibernate时却不能正常执行,程序大概如下
String name=new String(s.getBytes("iso-8859-1"),"gbk"),
//执行上步时name显示正常
Query query=session.createQuery("from customers c where c.name='"+name+"'");
//执行到该步时不能正常执行,中文也不能正常显示,
不知道是数据库的事还是hibernate本身的问题,按理说hibernate本身应该每问题,郁闷好几天了,请各位大虾帮忙解决以下,感激不仅!