|
Java™ by example!
|
|
|
How do I read a file that is encoded in UTF-8 using a Reader?
You can specify the encoding UTF-8 with InputStreamReader. This class will convert the incoming bytes to Unicode. Main.java:
Note: Since UTF-8 is backwards compatible with ASCII, you can test this program with those types of files.
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|