jsp+ MS access 乱码我的数据库的内容是中文的。
可是当我在网业上输入中文的时候,MS access 数据库储存的东西就变成了问号 (??)。
而且, MS access 数据库里的中文数据在网业上也显示不出来, 还是问号 (??)。
谁能帮我解决这个问题呀? 谢谢[kowaii (9-11 12:08, Long long ago)]
[ 传统版 |
sForum ][登录后回复]1楼
there are two different problemsyou described that the database you have contained Chinese content but when you try to disaply the results from query on web page, you get '?'
it looks like encoding problem. are you using GB2312 on your web pages?
also, if user input can't be stored correctly in Access database, it could mean that the webpages are encoded in GB2312 while Access is in some other encoding format. [SmellsLikeTeenSpirit (9-11 17:15, Long long ago)]
[ 传统版 |
sForum ][登录后回复]2楼
(引用 SmellsLikeTeenSpirit:there are two different problemsyou described that the database you have contained Chinese content but when you try to disaply t...)input no problemWhen I input Chinese through webpage and store in Database, it is ok. The chinese characters are displayed in database.
But when I retrieve data from database, it shows "?" on website.
so, what can I do yah?
Thanx[kowaii (9-12 15:47, Long long ago)]
[ 传统版 |
sForum ][登录后回复]3楼
(引用 kowaii:input no problemWhen I input Chinese through webpage and store in Database, it is ok. The chinese characters are displayed in da...)Access should be using UTF8 formatand if you web page is using GB2312, then it can't be displayed properly.
[SmellsLikeTeenSpirit (9-12 16:18, Long long ago)]
[ 传统版 |
sForum ][登录后回复]4楼
so what can I do now?how can I change the UTF8 format?[kowaii (9-12 23:42, Long long ago)] [ 传统版 | sForum ][登录后回复]5楼
(引用 SmellsLikeTeenSpirit:Access should be using UTF8 formatand if you web page is using GB2312, then it can't be displayed properly.
)so what can I do now? HELP!!~~~**********************************************************************
To discribe my situation again:
I am currently designing a chinese resource repository using JSP and MS Access.
The data in Access is in Chinese.
Case 1: when I enter data in to db through website, the chinese characters can store in Access nicely in Chinese.
Case2: When I try to retrieve data from db to webpage, all the chinese charactors become "Luan Ma". Most of the "Luan Ma" are question marks "???"
I have been trying to solve this problem for 2 days, but still could not find an solution
there are some reference, but I still could not get it.
http://www.itpub.net/247487.html
http://www.java-cn.com/bbs-jsp/show.jsp?id=1574&forum=chinese
http://www.weste.net/html/200405/20040521QBI075546.html
Do you have any idea how to solve the proble?
what is the default chinese Unicode in MS access? IE? JSP? Tomcat?[kowaii (9-13 11:58, Long long ago)]
[ 传统版 |
sForum ][登录后回复]6楼
(引用 kowaii:so what can I do now? HELP!!~~~********************************************************************** To discribe my situation a...)You can set the encoding for your web page as well as db access.Try to match them.[Flying (9-13 17:37, Long long ago)] [ 传统版 | sForum ][登录后回复]7楼