aspose file tools*
The moose likes I/O and Streams and the fly likes Read non UNICODE character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Read non UNICODE character" Watch "Read non UNICODE character" New topic
Author

Read non UNICODE character

s Joshi
Greenhorn

Joined: Sep 26, 2005
Posts: 12
My text file has a line like this: �this is a test�. I copied this line from MicroSoft Word Document. I am trying to read this file using IputStreamReader and then import this string in Oracle Database.

When I read this file, it reads this line like this: �this is a test�. How can I read this line just the way it is?

Any help is appreciated.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8964
    
    9

The problem is that a Word document is not a text document. If you read it with InputStreamReader, the weird characters Word uses for things like quotes don't match up with the plain text equivilents. Your choices are to either change the data file to be plain text or to filter out the weird characters and replace them in your program.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Read non UNICODE character