From 354d70078930f1ceea8dc93b7cd7ef2990d10b02 Mon Sep 17 00:00:00 2001 From: Svitlana Nesterenko Date: Thu, 22 May 2014 22:38:49 +0300 Subject: [PATCH] UTF-8 encoding properties. Resolves #77 --- .../java/org/aeonbits/owner/loaders/PropertiesLoader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/owner/src/main/java/org/aeonbits/owner/loaders/PropertiesLoader.java b/owner/src/main/java/org/aeonbits/owner/loaders/PropertiesLoader.java index a3b3c79f..c667f895 100644 --- a/owner/src/main/java/org/aeonbits/owner/loaders/PropertiesLoader.java +++ b/owner/src/main/java/org/aeonbits/owner/loaders/PropertiesLoader.java @@ -10,6 +10,7 @@ import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; import java.net.URL; import java.util.Properties; @@ -22,13 +23,14 @@ public class PropertiesLoader implements Loader { private static final long serialVersionUID = -1781643040589572341L; + private static final String DEFAULT_ENCODING = "UTF-8"; public boolean accept(URL url) { return true; } public void load(Properties result, InputStream input) throws IOException { - result.load(input); + result.load(new InputStreamReader(input, DEFAULT_ENCODING)); } public String defaultSpecFor(String urlPrefix) {