[hotjoe.com] HotJoe Java Help Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Visit java.com
Please send email if you are having login problems - see the posts below for more info.
Hotmail and Yahoo! users - please see the Hotmail post or the Yahoo! post for information on lost emails.
Insert unicode data into MySQL using scripts  XML
Forum Index » Jisql
Author Message
anilreddyg

Newbie

Joined: 07/05/2007 18:33:04
Messages: 2
Offline

I am trying to apply some database scripts that have some Russian text, to a MySQL database, using JiSQL and it always inserts some wierd characters. If I run the same script using MySQL query browser or any other GUI based tool, data is fine. All the tables are setup as UTF-8 to support Russian data.

Is there any option or switch that I have to use to insert Unicode data? Please advise.

thanks
Anil G
anilreddyg

Newbie

Joined: 07/05/2007 18:33:04
Messages: 2
Offline

Never mind. I found a solution to the problem by making a slight change to the code. Just this one line change:
reader = new BufferedReader(new InputStreamReader(new FileInputStream(inputFileName), "UTF-16"));

and ofcourse connection string settings also...

Since this is not a generic change, I am not sending you the code.

thanks
Anil G
stdunbar

Newbie
[Avatar]

Joined: 06/22/2005 14:51:37
Messages: 849
Location: Superior, CO, USA
Offline

Thanks for that update - I'll add it to the next version.

Thanks for using the forums at hotjoe.com
[WWW] [Yahoo!] [ICQ]
 
Forum Index » Jisql
Go to:   
Powered by JForum 2.1.9 © JForum Team
This site run by Scott Dunbar of Xigole Systems. © 2005-2011 - Scott Dunbar
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners
hotjoe.com, xigole.com, and Scott Dunbar have no affiliation with Oracle