• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Help ...to read text file.....???  RSS feed

 
Sumeet Pandit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the InputStreamReader class extended in my class. From there I used read() method to read the characters from a file which is having arabic text. From read method I am getting the character in ASCII format...which cann't possible to display on browser...as all browser display ANSI format...
Is someone having the idea..How to read the arabic text from file and display it on the browser?rolleyes:
Thanks in advance.... :
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which browser are you using? You should be able to select a character encoding for an Arabic character set. I'm using IE 5 and i have a setting under the View menu:

And this is just the way the browser came installed. So I think you might be able to do the same thing.
 
Sumeet Pandit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur quickest reply...

I set the same, but it is in vain..because from the method I get the ASCII format...I need help to get the data in ANSI format....
Plz reply.....
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the file really is encoded in some Arabic encoding, and you are really only getting 8 bit characters from read(), there's a problem, either with your read method, or with the encoding you are using.
How are you creating your InputStreamReader? you should be using the constructor that takes a String encoding paramater. Do you know the encoding name of the file?
 
Sumeet Pandit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur quickest reply...

I set the same, but it is in vain..because from the method I get the ASCII format...I need help to get the data in ANSI format....
Plz reply.....
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
post your code so I can take a look at what you are doing.
 
Sumeet Pandit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Ross:
post your code so I can take a look at what you are doing.

Plz check your private mail box.
and Plz reply
 
ersin eser
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sumeet
Please read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you for your cooperation.
 
Sumeet Pandit
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ersin Eser,
Changed as per JavaRanch Naming Policy.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!