Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading from ANSI and writing to UTF8?

807606Mar 6 2007 — edited Mar 7 2007
Hello.

I am writing a program that reads text files and writes each file as a list of the words in the file. My text files contains both English and Arabic words. The files are encoded in ANSI. When I write them I want to encode the resulting files in UTF-8. The problem is whenever I set the writing encoding to UTF-8 it gives me garbage characters instead of the Arabic. Even when I set the reading encoding to UTF-8 it does not work. I am a bit lost as to what to do. Any suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2007
Added on Mar 6 2007
13 comments
4,734 views