Skip to content

Commit 7a1f305

Browse files
committed
add char set for config resource
1 parent 69d56d1 commit 7a1f305

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/redhat/labs/lodestar/service/ConfigService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.redhat.labs.lodestar.service;
22

33
import java.io.IOException;
4+
import java.nio.charset.StandardCharsets;
45
import java.nio.file.Files;
56
import java.nio.file.Path;
67
import java.nio.file.Paths;
@@ -102,7 +103,7 @@ private String readFile(String file) {
102103
if (Files.isReadable(path)) {
103104
LOGGER.debug("Loading config file {}", file);
104105
try {
105-
return new String(Files.readAllBytes(path));
106+
return new String(Files.readAllBytes(path), StandardCharsets.UTF_8);
106107
} catch (IOException e) {
107108
LOGGER.error(String.format("Found but unable to read file %s", file), e);
108109
}

0 commit comments

Comments
 (0)