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?


vincent_cp88Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vladi21Commented:
try use Jdbc:Odbc bridge form  Java 2

// file.encoding

  Properties connInfo = new Properties();

  connInfo.put("user", username);
  connInfo.put("password", password);
  connInfo.put("charSet", "urChinesCharset";
  Connection db = DriverManager.getConnection(dataurl, connInfo);

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vladi21Commented:
only Access 2000 use Unicode

also look
Multilingual Databases and Global Internet Integration
http://www.chg.ru/inet97/A8/A8_2.HTM
0
vincent_cp88Author Commented:
My configuration is:
JDK1.2.2
JSDK2.0
Apache 1.3.6
Apache JServer
Access 2000
Windows98 and Windows98(Chinese Version)
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

vladi21Commented:
what about NT ?
0
vincent_cp88Author Commented:
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?
0
vladi21Commented:
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.getCharacterStream
CallableStatement.getCharacterStream
PreparedStatement.setCharacterStream
0
MoondancerCommented:
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.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.