summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/BookInput.java3
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/TextInput.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/BookInput.java b/Essentials/src/com/earth2me/essentials/textreader/BookInput.java
index b0fedbf86..f4477aa3c 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/BookInput.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/BookInput.java
@@ -80,7 +80,8 @@ public class BookInput implements IText
}
if (readFromfile)
{
- final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
+ final Reader reader = new InputStreamReader(new FileInputStream(file), "utf-8");
+ final BufferedReader bufferedReader = new BufferedReader(reader);
try
{
int lineNumber = 0;
diff --git a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java
index cd7ee6ec4..1ea2f6a01 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/TextInput.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/TextInput.java
@@ -61,7 +61,8 @@ public class TextInput implements IText
}
if (readFromfile)
{
- final BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
+ final Reader reader = new InputStreamReader(new FileInputStream(file), "utf-8");
+ final BufferedReader bufferedReader = new BufferedReader(reader);
try
{
int lineNumber = 0;