Skip to content

Commit e0e51a3

Browse files
committed
gitk: Fixing file name encoding issues
Signed-off-by: Kazuhiro Kato <[email protected]>
1 parent 4a6cc6a commit e0e51a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gitk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8346,6 +8346,7 @@ proc parseblobdiffline {ids line} {
83468346
if {$type eq "--cc"} {
83478347
# start of a new file in a merge diff
83488348
set fname [string range $line 10 end]
8349+
set fname [encoding convertfrom utf-8 $fname]
83498350
if {[lsearch -exact $treediffs($ids) $fname] < 0} {
83508351
lappend treediffs($ids) $fname
83518352
add_flist [list $fname]
@@ -8379,6 +8380,7 @@ proc parseblobdiffline {ids line} {
83798380
83808381
} elseif {![string compare -length 16 "* Unmerged path " $line]} {
83818382
set fname [encoding convertfrom utf-8 [string range $line 16 end]]
8383+
set line [encoding convertfrom utf-8 $line]
83828384
$ctext insert end "\n"
83838385
set curdiffstart [$ctext index "end - 1c"]
83848386
lappend ctext_file_names $fname
@@ -12519,6 +12521,7 @@ catch {
1251912521
if {$gitencoding == ""} {
1252012522
set gitencoding "utf-8"
1252112523
}
12524+
encoding system utf-8
1252212525
set tclencoding [tcl_encoding $gitencoding]
1252312526
if {$tclencoding == {}} {
1252412527
puts stderr "Warning: encoding $gitencoding is not supported by Tcl/Tk"

0 commit comments

Comments
 (0)