Topic: jsp调用mysql显示数据库中文乱码!怎么办?

  Print this page

1.jsp调用mysql显示数据库中文乱码!怎么办? Copy to clipboard
Posted by: zhouxisky
Posted on: 2005-12-12 13:01

jsp调用mysql显示数据库中文乱码!怎么办?
各位大哥,帮帮小弟!
小弟是初学者!
谢谢了!

2.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: verwa
Posted on: 2005-12-12 13:02

jsp文件用UTF—8就可以了!

3.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: verwa
Posted on: 2005-12-12 13:03


4.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: zhouxisky
Posted on: 2005-12-12 17:18

改成UTF-8也不行呀~!!

5.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: zlsunnan
Posted on: 2005-12-13 13:58

String url = "jdbc:mysql://" + ServiceConfig.dbServer + "/DB?characterEncoding=utf8";

用这个可以

6.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: zhouxisky
Posted on: 2005-12-13 22:28

是在调用数据库页面加上这个么??

7.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zlsunnan] Copy to clipboard
Posted by: zhouxisky
Posted on: 2005-12-13 22:34

zlsunnan wrote:
String url = "jdbc:mysql://" + ServiceConfig.dbServer + "/DB?characterEncoding=utf8";

用这个可以


这个怎么加??
麻烦大哥指点一下
我试了还是乱码的

8.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: morphine
Posted on: 2005-12-16 09:38

在与数据库连接的时候要用到一个url,像zlsunnan写的那样把characterEncoding=utf-8加到后面

9.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: zhouxisky
Posted on: 2005-12-18 23:25

谢谢
问题解决
谢谢各位

10.Re:jsp调用mysql显示数据库中文乱码!怎么办? [Re: zhouxisky] Copy to clipboard
Posted by: andy_taoke
Posted on: 2005-12-29 16:01

转换一下编码也可以~~


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923