diff options
Diffstat (limited to '')
| -rwxr-xr-x | git-gui.sh | 13 | ||||
| -rw-r--r-- | lib/blame.tcl | 2 | ||||
| -rw-r--r-- | lib/commit.tcl | 6 |
3 files changed, 14 insertions, 7 deletions
diff --git a/git-gui.sh b/git-gui.sh index 2c83ed5066..1ebf1e288d 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -84,6 +84,13 @@ if {[package vcompare $::tcl_version 9.0] >= 0} { chan configure $f -profile tcl8 return $f } + proc convertfrom args { + return [encoding convertfrom -profile tcl8 {*}$args] + } +} else { + proc convertfrom args { + return [encoding convertfrom {*}$args] + } } ###################################################################### @@ -1543,7 +1550,7 @@ proc read_diff_index {fd after} { set i [split [string range $buf_rdi $c [expr {$z1 - 2}]] { }] set p [string range $buf_rdi $z1 [expr {$z2 - 1}]] merge_state \ - [encoding convertfrom utf-8 $p] \ + [convertfrom utf-8 $p] \ [lindex $i 4]? \ [list [lindex $i 0] [lindex $i 2]] \ [list] @@ -1576,7 +1583,7 @@ proc read_diff_files {fd after} { set i [split [string range $buf_rdf $c [expr {$z1 - 2}]] { }] set p [string range $buf_rdf $z1 [expr {$z2 - 1}]] merge_state \ - [encoding convertfrom utf-8 $p] \ + [convertfrom utf-8 $p] \ ?[lindex $i 4] \ [list] \ [list [lindex $i 0] [lindex $i 2]] @@ -1599,7 +1606,7 @@ proc read_ls_others {fd after} { set pck [split $buf_rlo "\0"] set buf_rlo [lindex $pck end] foreach p [lrange $pck 0 end-1] { - set p [encoding convertfrom utf-8 $p] + set p [convertfrom utf-8 $p] if {[string index $p end] eq {/}} { set p [string range $p 0 end-1] } diff --git a/lib/blame.tcl b/lib/blame.tcl index 22c5e7a193..4477b84eae 100644 --- a/lib/blame.tcl +++ b/lib/blame.tcl @@ -997,7 +997,7 @@ method _showcommit {cur_w lno} { set enc [tcl_encoding $enc] if {$enc ne {}} { - set msg [encoding convertfrom $enc $msg] + set msg [convertfrom $enc $msg] } set msg [string trim $msg] } diff --git a/lib/commit.tcl b/lib/commit.tcl index 5e77fd2f54..2c2f73d3af 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -43,9 +43,9 @@ You are currently in the middle of a merge that has not been fully completed. Y set enc [tcl_encoding $enc] if {$enc ne {}} { - set msg [encoding convertfrom $enc $msg] - set name [encoding convertfrom $enc $name] - set email [encoding convertfrom $enc $email] + set msg [convertfrom $enc $msg] + set name [convertfrom $enc $name] + set email [convertfrom $enc $email] } if {$name ne {} && $email ne {}} { set commit_author [list name $name email $email date $time] |
