vincent_cp88
asked on
JDBC:ODBE:ACCESS and Chinese
I am writing a servlet to get the comment from the web. After they summit the comment, I will convert the comment from UTF-8 to Unicode, then display the comment immediatly and then save it into the database through Jdbc:Odbc. However, somthing's wrong:
1. The comment displayed immediately is correct. I can see the chinese character.
2. But, the character saved in Access is changed to be '??'
I have tried many ways to solve it. First, I try to type some chinese characters in Access directly, and it is OK. Second, I try to change the platform to Chinese Windows 98 and something more strange happen:
Sometimes, the chinese character can be saved in the DB correctly, but sometimes, a SQLException occur. It said that the update query is with wrong syntax. (It works fine with English words)
Any solution?
1. The comment displayed immediately is correct. I can see the chinese character.
2. But, the character saved in Access is changed to be '??'
I have tried many ways to solve it. First, I try to type some chinese characters in Access directly, and it is OK. Second, I try to change the platform to Chinese Windows 98 and something more strange happen:
Sometimes, the chinese character can be saved in the DB correctly, but sometimes, a SQLException occur. It said that the update query is with wrong syntax. (It works fine with English words)
Any solution?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My configuration is:
JDK1.2.2
JSDK2.0
Apache 1.3.6
Apache JServer
Access 2000
Windows98 and Windows98(Chinese Version)
JDK1.2.2
JSDK2.0
Apache 1.3.6
Apache JServer
Access 2000
Windows98 and Windows98(Chinese Version)
what about NT ?
ASKER
From the previous question, I found that, the Jdbc:Odbc bridge will truncat the higher 8-bits to zero and only pass the lower 8-bits to the DBMS. So, I want to ask, Does this bug has been solved in JDK1.2.2? If not, what can I do?
what about
http://java.sun.com/products/jdk/1.3/docs/guide/jdbc/getstart/appendixA.html#1006294
character streams for streams of internationalized Unicode characters
Character streams-new methods that allow character data to be retrieved or sent to the database as a stream of internationalized Unicode characters. These methods replace the deprecated getUnicodeStream and setUnicodeStream methods.
ResultSet.getCharacterStre am
CallableStatement.getChara cterStream
PreparedStatement.setChara cterStream
http://java.sun.com/products/jdk/1.3/docs/guide/jdbc/getstart/appendixA.html#1006294
character streams for streams of internationalized Unicode characters
Character streams-new methods that allow character data to be retrieved or sent to the database as a stream of internationalized Unicode characters. These methods replace the deprecated getUnicodeStream and setUnicodeStream methods.
ResultSet.getCharacterStre
CallableStatement.getChara
PreparedStatement.setChara
This question was awarded, but never cleared due to the JSP-500 errors of that time. It was "stuck" against userID -1 versus the intended expert whom you awarded. This corrects the problem and the expert will now receive these points; points verified.
Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them. If you are an EE Pro user, you can also choose Power Search to find all your open questions.
This is the Community Support link, if help is needed. Also a question is posted there specific to these changes that apply to the experts here. Also, I am including the link to our All Topics, since many new ones have recently been added.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
Thank you,
Moondancer
Moderator @ Experts Exchange
Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them. If you are an EE Pro user, you can also choose Power Search to find all your open questions.
This is the Community Support link, if help is needed. Also a question is posted there specific to these changes that apply to the experts here. Also, I am including the link to our All Topics, since many new ones have recently been added.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
Thank you,
Moondancer
Moderator @ Experts Exchange
also look
Multilingual Databases and Global Internet Integration
http://www.chg.ru/inet97/A8/A8_2.HTM