You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/09/19 11:24:25 UTC
[hop] 01/01: HOP-4210: write tempfile using system charset
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch HOP-4210
in repository https://gitbox.apache.org/repos/asf/hop.git
commit ba9afcc04e95d1f8088e8a8ecd254407ed5d596f
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Mon Sep 19 13:24:07 2022 +0200
HOP-4210: write tempfile using system charset
---
.../main/java/org/apache/hop/workflow/actions/shell/ActionShell.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
index 5fb811e94c..58229c4c40 100644
--- a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
+++ b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
@@ -49,6 +49,7 @@ import org.w3c.dom.Node;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -621,7 +622,7 @@ public class ActionShell extends ActionBase implements Cloneable, IAction {
}
tempFile.createFile();
OutputStream outputStream = tempFile.getContent().getOutputStream();
- outputStream.write(fileContent.getBytes());
+ outputStream.write(fileContent.getBytes(Charset.defaultCharset()));
outputStream.close();
if (!isWindows) {
String tempFilename = HopVfs.getFilename(tempFile);