From d04458bbef96759ddbcd0d4a7099364abf85e10e Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 12 Jul 2021 18:30:12 +0000 Subject: [PATCH] IDEA-272962 git: fix encoding for gpg key usernames GitOrigin-RevId: 1b5acf4abbfb7a1821fec6d9206dd504529181b9 --- plugins/git4idea/src/git4idea/commands/GitImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git4idea/src/git4idea/commands/GitImpl.java b/plugins/git4idea/src/git4idea/commands/GitImpl.java index c83458178e56..f9b95a3b3658 100644 --- a/plugins/git4idea/src/git4idea/commands/GitImpl.java +++ b/plugins/git4idea/src/git4idea/commands/GitImpl.java @@ -41,6 +41,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.File; +import java.nio.charset.StandardCharsets; import java.util.*; import static git4idea.GitUtil.COMMENT_CHAR; @@ -873,6 +874,7 @@ public class GitImpl extends GitImplBase { try { GitExecutable gitExecutable = GitExecutableManager.getInstance().getExecutable(project); GeneralCommandLine command = gitExecutable.createBundledCommandLine(project, args); + command.setCharset(StandardCharsets.UTF_8); StringBuilder output = new StringBuilder(); OSProcessHandler handler = new OSProcessHandler(command);