This is an automated email from the ASF dual-hosted git repository.
zike pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 0ae6f0a5c Use UTF_8 as the encoding when generating the label (#1701)
0ae6f0a5c is described below
commit 0ae6f0a5c14c9ada4ec27d61a837ab704946a9fb
Author: Zike Yang <[email protected]>
AuthorDate: Wed Jun 21 19:11:01 2023 +0800
Use UTF_8 as the encoding when generating the label (#1701)
We use UTF-8 encoding for the locale files. It's better to specify the
encoding when reading those files.
---
.../streampipes/extensions/management/locales/LabelGenerator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/locales/LabelGenerator.java
b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/locales/LabelGenerator.java
index 2bfb9a6d0..3ce1807a3 100644
---
a/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/locales/LabelGenerator.java
+++
b/streampipes-extensions-management/src/main/java/org/apache/streampipes/extensions/management/locales/LabelGenerator.java
@@ -34,6 +34,8 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
import java.util.Properties;
import static
org.apache.streampipes.extensions.management.util.LocalesUtil.makePath;
@@ -126,7 +128,7 @@ public class LabelGenerator {
private Properties makeProperties() throws IOException {
Properties props = new Properties();
- props.load(loadResource());
+ props.load(new InputStreamReader(loadResource(), StandardCharsets.UTF_8));
return props;
}