@matheusbsbs / matheus-bagliano / commits / 495473c08a
Fork 0

[PATCH] gitk: UTF-8 support

Add gitencoding variable and set it to "utf-8". Use it for converting git-rev-list output. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Paul Mackerras <paulus@samba.org>

Pavel Roskin committed Nov 22, 2005 at 23:15 UTC 495473c08a957464e7e326ae7bafb477db90fcbe
1 file changed +3 -2
gitk
+3 -2
@@ -19,7 +19,7 @@ proc gitdir {} {
19 proc getcommits {rargs} {
20 global commits commfd phase canv mainfont env
21 global startmsecs nextupdate ncmupdate
22 - global ctext maincursor textcursor leftover
22 + global ctext maincursor textcursor leftover gitencoding
23
24 # check that we can find a .git directory somewhere...
25 set gitdir [gitdir]
@@ -49,7 +49,7 @@ proc getcommits {rargs} {
49 exit 1
50 }
51 set leftover {}
52 - fconfigure $commfd -blocking 0 -translation lf
52 + fconfigure $commfd -blocking 0 -translation lf -encoding $gitencoding
53 fileevent $commfd readable [list getcommitlines $commfd]
54 $canv delete all
55 $canv create text 3 3 -anchor nw -text "Reading commits..." \
@@ -3658,6 +3658,7 @@ set datemode 0
3658 set boldnames 0
3659 set diffopts "-U 5 -p"
3660 set wrcomcmd "git-diff-tree --stdin -p --pretty"
3661 +set gitencoding "utf-8"
3662
3663 set mainfont {Helvetica 9}
3664 set textfont {Courier 9}