Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-28 17:10:13 +01:00
it's 2021 and we should use UTF 8 (#2633)
Dieser Commit ist enthalten in:
Ursprung
db87774426
Commit
9874a9053a
@ -21,12 +21,13 @@ import com.google.common.base.Joiner;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.io.CharStreams;
|
import com.google.common.io.CharStreams;
|
||||||
|
import com.google.common.io.Files;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -173,19 +174,7 @@ public class CommentStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Write data to file
|
// Write data to file
|
||||||
FileWriter writer = null;
|
Files.write(fileData.toString(), output, StandardCharsets.UTF_8);
|
||||||
try {
|
|
||||||
writer = new FileWriter(output);
|
|
||||||
writer.write(fileData.toString());
|
|
||||||
writer.flush();
|
|
||||||
} finally {
|
|
||||||
if (writer != null) {
|
|
||||||
try {
|
|
||||||
writer.close();
|
|
||||||
} catch (IOException ignored) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String addHeaderTags(List<String> header, String indent) {
|
private String addHeaderTags(List<String> header, String indent) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren