Use StandardCharsets
This commit is contained in:
parent
ae40b01161
commit
fece9d720a
@ -8,6 +8,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
@ -128,7 +129,7 @@ public class LangLoader {
|
||||
|
||||
// Save file
|
||||
fos = new FileOutputStream(datFolder + lang + ".txt");
|
||||
OutputStreamWriter out = new OutputStreamWriter(fos, "UTF8");
|
||||
OutputStreamWriter out = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
|
||||
BufferedWriter bw = new BufferedWriter(out);
|
||||
|
||||
// Output normal Language data
|
||||
@ -168,9 +169,9 @@ public class LangLoader {
|
||||
try {
|
||||
if (is == null) {
|
||||
fis = new FileInputStream(datFolder + lang + ".txt");
|
||||
isr = new InputStreamReader(fis, "UTF8");
|
||||
isr = new InputStreamReader(fis, StandardCharsets.UTF_8);
|
||||
} else {
|
||||
isr = new InputStreamReader(is, "UTF8");
|
||||
isr = new InputStreamReader(is, StandardCharsets.UTF_8);
|
||||
}
|
||||
BufferedReader br = new BufferedReader(isr);
|
||||
String line = br.readLine();
|
||||
|
Loading…
x
Reference in New Issue
Block a user