mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
FileUtils.readFileToString opens files with UTF-8 encoding
This commit is contained in:
parent
ff970f10b1
commit
d5cc92d8ab
@ -171,7 +171,7 @@ public class FileUtils {
|
||||
public static String readFileToString(File file) throws IOException {
|
||||
BufferedReader reader = null;
|
||||
try {
|
||||
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user