about summary refs log tree commit diff
path: root/third_party/git/git-gui/git-gui--askpass
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/git-gui/git-gui--askpass')
-rwxr-xr-xthird_party/git/git-gui/git-gui--askpass5
1 files changed, 5 insertions, 0 deletions
diff --git a/third_party/git/git-gui/git-gui--askpass b/third_party/git/git-gui/git-gui--askpass
index 4277f30c4116..1c99ee8ca20d 100755
--- a/third_party/git/git-gui/git-gui--askpass
+++ b/third_party/git/git-gui/git-gui--askpass
@@ -56,6 +56,11 @@ proc finish {} {
 		}
 	}
 
+	# On Windows, force the encoding to UTF-8: it is what `git.exe` expects
+	if {$::tcl_platform(platform) eq {windows}} {
+		set ::answer [encoding convertto utf-8 $::answer]
+	}
+
 	puts $::answer
 	set ::rc 0
 }