From cf5d3c5a78ae5be2209bb0d0d91ce1eaf0296c04 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 12 Dec 2016 16:16:50 +0300 Subject: juick-spring-www: fix help charset --- juick-spring-www/src/main/java/com/juick/www/HelpService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-spring-www/src') diff --git a/juick-spring-www/src/main/java/com/juick/www/HelpService.java b/juick-spring-www/src/main/java/com/juick/www/HelpService.java index 76b3582d..f6e9d352 100644 --- a/juick-spring-www/src/main/java/com/juick/www/HelpService.java +++ b/juick-spring-www/src/main/java/com/juick/www/HelpService.java @@ -4,6 +4,7 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.core.io.ClassPathResource; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; @@ -33,7 +34,7 @@ public class HelpService { file = Paths.get(new ClassPathResource(path).getURI()); if (Files.isReadable(file)) - return new String(Files.readAllBytes(file)); + return new String(Files.readAllBytes(file), StandardCharsets.UTF_8); } catch (IOException e) { } } -- cgit v1.2.3