jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes russian text(very urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "russian text(very urgent)" Watch "russian text(very urgent)" New topic

russian text(very urgent)

suryamohan godavarthi

Joined: Sep 17, 2003
Posts: 1
Hai Friends,
I have got an unsual problem.I have been breaking my
head over this problem for the past two days.It is as follows.
I have an excel sheet(MicroSoft) which contains english text
and russian text.I want to read both english and russian text
from excel sheet and write into another text file.
I wrote a java program which make use of jdbc-odbc to
read data.I am able to read data from excel sheet,But the
the russian text is comming as '???' and it is being printed
is '???' in text file(No problem with english text obiviously).
I thought the problem lies with encoding.I tried following
ways to avoid '???'.
Properties p=new Properties();
p.put("file.encoding","ISO8859_5") ;
Connection con=DriverManager.getConnection("jdbc dbc:xx",p);
String str=new String(rs.getBytes(3),"ISO8859_5")
(3)OutputStreamWriter osw=new OutputStreamWriter(new FileOutputStream(new File("result.txt")),"ISO8859_5");
BufferedWriter bw=new BufferedWriter(osw);
But i am not able to fulfill my requirement.
I request u to come up with some ideas.

any help will be highly appreciated.
Praveen Balaji
Ranch Hand

Joined: Jun 17, 2001
Posts: 60
Did you try changing your locale settings. Might not be a solution, but take a shot..
I agree. Here's the link: http://aspose.com/file-tools
subject: russian text(very urgent)
It's not a secret anymore!