Reputation: 75
I am trying to read in a file that has special symbols like: - l"Université - Borély
But Java is outputting things like: - l"université - Borely
Is there a way to read in a file that would preserve any special symbols? What format should the file be?
Thanks,
Upvotes: 1
Views: 1017
Reputation: 20065
Maybe your looking for the Latin1 ISO. Try something like that:
BufferedReader inputStream = new BufferedReader(new InputStreamReader(
new FileInputStream(file), "ISO-8859-1"));
Upvotes: 0
Reputation: 308733
All should be well if you use UTF-8 encoding when you write and read the file.
Upvotes: 2