Skip to content

Commit

Permalink
[PATCH] gitk: UTF-8 support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Roskin authored and Paul Mackerras committed Nov 23, 2005
1 parent 2ed49d5 commit 495473c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ proc gitdir {} {
proc getcommits {rargs} {
global commits commfd phase canv mainfont env
global startmsecs nextupdate ncmupdate
global ctext maincursor textcursor leftover
global ctext maincursor textcursor leftover gitencoding

# check that we can find a .git directory somewhere...
set gitdir [gitdir]
Expand Down Expand Up @@ -49,7 +49,7 @@ proc getcommits {rargs} {
exit 1
}
set leftover {}
fconfigure $commfd -blocking 0 -translation lf
fconfigure $commfd -blocking 0 -translation lf -encoding $gitencoding
fileevent $commfd readable [list getcommitlines $commfd]
$canv delete all
$canv create text 3 3 -anchor nw -text "Reading commits..." \
Expand Down Expand Up @@ -3658,6 +3658,7 @@ set datemode 0
set boldnames 0
set diffopts "-U 5 -p"
set wrcomcmd "git-diff-tree --stdin -p --pretty"
set gitencoding "utf-8"

set mainfont {Helvetica 9}
set textfont {Courier 9}
Expand Down

0 comments on commit 495473c

Please sign in to comment.