Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

russian text(very urgent)

 
suryamohan godavarthi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try changing your locale settings. Might not be a solution, but take a shot..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic