首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

JSP 和 oracle 中文乱码解决方法

2012-01-19 
JSP 和 oracle 中文乱码JSP读取oracle数据库乱码怎么决绝~~使用newString(rs.getString( name ).getByte

JSP 和 oracle 中文乱码
JSP   读取oracle数据库乱码怎么决绝~~
使用new   String(rs.getString( "name ").getBytes( "ISO8859-1 "))
还是乱码?

[解决办法]
tomcat/weblogic??
if tomcat
out.println 版本?
[解决办法]
new String( rs.getString( "name ").getBytes( "iso-8859-1 "), "GB2312 ")

[解决办法]
Linux ?

linux最好使用GBK吧
如果是tomcat 最好使用过滤器
把该设置的编码的地方都设置上编码
如 server.xml中的 <Connector 中加入 URIEncoding= "GBK "
还有.jsp等...
搜索论坛 有很多关于 中文乱码的贴子

热点排行