Skip to content

Commit 40f54f6

Browse files
committed
git-gui: replace encoding binary with iso8859-1
git-gui currently configures some channels as '-encoding binary' when the channel is not really binary (e.g, the channel is consumed as lines of text). In 8.6, '-encoding binary' is an alias for '-encoding iso8859), but TIP 699 removes this alias for Tcl 9.0. Let's switch to '-encoding iso8859-1' to be compatible across Tcl versions. Signed-off-by: Mark Levedahl <[email protected]>
1 parent f6d3ee2 commit 40f54f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/blame.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ method _showcommit {cur_w lno} {
985985
set msg {}
986986
catch {
987987
set fd [git_read [list cat-file commit $cmit]]
988-
fconfigure $fd -encoding binary -translation lf
988+
fconfigure $fd -encoding iso8859-1 -translation lf
989989
# By default commits are assumed to be in utf-8
990990
set enc utf-8
991991
while {[gets $fd line] > 0} {

lib/commit.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You are currently in the middle of a merge that has not been fully completed. Y
2828
set name ""
2929
set email ""
3030
set fd [git_read [list cat-file commit $curHEAD]]
31-
fconfigure $fd -encoding binary -translation lf
31+
fconfigure $fd -encoding iso8859-1 -translation lf
3232
# By default commits are assumed to be in utf-8
3333
set enc utf-8
3434
while {[gets $fd line] > 0} {
@@ -361,7 +361,7 @@ proc commit_committree {fd_wt curHEAD msg_p} {
361361
#
362362
if {$commit_type eq {normal}} {
363363
set fd_ot [git_read [list cat-file commit $PARENT]]
364-
fconfigure $fd_ot -encoding binary -translation lf
364+
fconfigure $fd_ot -encoding iso8859-1 -translation lf
365365
set old_tree [gets $fd_ot]
366366
close $fd_ot
367367

0 commit comments

Comments
 (0)