summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2022-01-12 01:53:34 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2022-01-19 09:54:37 +0100
commit4aca4e0a3125abeed07385c2166694a0880e0c28 (patch)
treed70eb9a36e38042baecb880da8ab265e3d0539d7 /org.eclipse.jgit.pgm
parent8e306e7a621b23945c462c2496c190a3248deabd (diff)
downloadjgit-4aca4e0a3125abeed07385c2166694a0880e0c28.tar.gz
jgit-4aca4e0a3125abeed07385c2166694a0880e0c28.zip
[errorprone] Fix implicit use of platform default charset
Change-Id: I42f893c4248d8b00bf4aaf59cd528c43940f99e2
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
index d26842c641..128881779b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTool.java
@@ -16,6 +16,7 @@ import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
import java.util.List;
import java.util.Map;
@@ -188,7 +189,8 @@ class DiffTool extends TextBuiltin {
outw.println(MessageFormat.format(CLIText.get().diffToolLaunch,
fileIndex, fileCount, fileName, toolNamePrompt));
outw.flush();
- BufferedReader br = new BufferedReader(new InputStreamReader(ins));
+ BufferedReader br = new BufferedReader(
+ new InputStreamReader(ins, StandardCharsets.UTF_8));
String line = null;
if ((line = br.readLine()) != null) {
if (!line.equalsIgnoreCase("Y")) { //$NON-NLS-1$