aspose file tools*
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
Author

russian text(very urgent)

suryamohan godavarthi
Greenhorn

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 '???'.
(1)
Properties p=new Properties();
p.put("file.encoding","ISO8859_5") ;
Connection con=DriverManager.getConnection("jdbc dbc:xx",p);
(2)
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);
bw.write(str);
But i am not able to fulfill my requirement.
I request u to come up with some ideas.

any help will be highly appreciated.
suryamohan
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..
 
jQuery in Action, 2nd edition
 
subject: russian text(very urgent)