File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: russian text(very urgent)
 
Similar Threads
write records to a file
Problem in writing extended ASCII characters into a file in japanese machines
Problem writing a string into a file
Read/Write
Write and Update CSV files