Skip to Main Content

New to Java

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!

How convert files or strings from ANSI to UTF-8?

BumpJun 19 2011 — edited Jun 28 2011
I have a program that reads line by line a file and writes to another. If the original file is ANSI, then the resulting is ANSI as well, and if the original is UTF-8 the resulting as well. How can I change this behavior so all output files are UTF-8 encoded, with BOM or without it?
This post has been answered by Narayan on Jun 19 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 26 2011
Added on Jun 19 2011
28 comments
19,819 views