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:
parent
ff970f10b1
commit
d5cc92d8ab
@ -171,7 +171,7 @@ public class FileUtils {
|
|||||||
public static String readFileToString(File file) throws IOException {
|
public static String readFileToString(File file) throws IOException {
|
||||||
BufferedReader reader = null;
|
BufferedReader reader = null;
|
||||||
try {
|
try {
|
||||||
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user