diff --git a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySource.java b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySource.java index 83468b2f..9332a659 100644 --- a/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySource.java +++ b/spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySource.java @@ -18,6 +18,7 @@ package org.springframework.cloud.consul.config; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.nio.charset.Charset; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -157,7 +158,8 @@ public class ConsulPropertySource extends EnumerablePropertySource } else if (format == YAML) { final YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean(); - yaml.setResources(new ByteArrayResource(value.getBytes())); + yaml.setResources( + new ByteArrayResource(value.getBytes(Charset.forName("UTF-8")))); return yaml.getObject(); }