summaryrefslogtreecommitdiff
path: root/lib/browser.tcl
diff options
context:
space:
mode:
authorLibravatar Karsten Blees <blees@dcon.de>2012-02-04 21:54:36 +0100
committerLibravatar Pat Thoyts <patthoyts@users.sourceforge.net>2016-10-06 09:21:50 +0100
commite2039e946e6efa6c220b3cf186671f93e7aec9b9 (patch)
tree0f2a67ae9371710e2bbbf7dc3fb3b5435e0c9f96 /lib/browser.tcl
parentMerge branch 'dr/ru' into pu (diff)
downloadtgif-e2039e946e6efa6c220b3cf186671f93e7aec9b9.tar.xz
git-gui: unicode file name support on windows
Assumes file names in git tree objects are UTF-8 encoded. On most unix systems, the system encoding (and thus the TCL system encoding) will be UTF-8, so file names will be displayed correctly. On Windows, it is impossible to set the system encoding to UTF-8. Changing the TCL system encoding (via 'encoding system ...', e.g. in the startup code) is explicitly discouraged by the TCL docs. Change git-gui functions dealing with file names to always convert from and to UTF-8. Signed-off-by: Karsten Blees <blees@dcon.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'lib/browser.tcl')
-rw-r--r--lib/browser.tcl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/browser.tcl b/lib/browser.tcl
index 158049353f..a982983667 100644
--- a/lib/browser.tcl
+++ b/lib/browser.tcl
@@ -197,7 +197,7 @@ method _ls {tree_id {name {}}} {
$w conf -state disabled
set fd [git_read ls-tree -z $tree_id]
- fconfigure $fd -blocking 0 -translation binary -encoding binary
+ fconfigure $fd -blocking 0 -translation binary -encoding utf-8
fileevent $fd readable [cb _read $fd]
}