Use UTF-8 when getting strings from configmaps. Fixes #1007
This commit is contained in:
@@ -19,6 +19,8 @@ package org.springframework.cloud.kubernetes.commons.config;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.function.BinaryOperator;
|
||||
@@ -96,7 +98,7 @@ public final class PropertySourceUtils {
|
||||
}
|
||||
return ABSTAIN;
|
||||
});
|
||||
yamlFactory.setResources(new ByteArrayResource(s.getBytes()));
|
||||
yamlFactory.setResources(new ByteArrayResource(s.getBytes(StandardCharsets.UTF_8)));
|
||||
return yamlFactory.getObject();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user