1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-02 13:24:12 +01:00

FileUtils.readFileToString opens files with UTF-8 encoding

This commit is contained in:
Federico Fissore 2013-11-28 15:28:12 +01:00
parent ff970f10b1
commit d5cc92d8ab

View File

@ -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) {