summaryrefslogtreecommitdiff
path: root/lib/commit.tcl
diff options
context:
space:
mode:
authorMark Levedahl <mlevedahl@gmail.com>2025-05-31 15:18:31 -0400
committerMark Levedahl <mlevedahl@gmail.com>2025-07-31 13:51:03 -0400
commitcc41d374fa9e130cf9b89da5cbcf7694257b7df1 (patch)
tree05e12dcc0fead71a2f2fae976f654d2c91557270 /lib/commit.tcl
parent24b10786bc4b0176db1f36a51911c75de0abcba5 (diff)
git-gui: use -profile tcl8 on encoding conversions
git-gui in the prior commit learned to apply -profile tcl8 when reading files, avoiding errors on non-binary data streams whose encoding is not utf-8. But, git-gui also consumes binary data streams (generally blobs from commits) as the output of commands, and internally decodes this to support various displays. With Tcl9, errors occur in this decoding for the same reasons described in the previous commit: basically, the underlying data may contain extended ascii characters violating the assumption of utf-8 encoding. This problem has a similar fix to the prior issue: we must use the tlc8 profile when converting this data to the internal unicode format. Do so, again only on Tcl9 as Tcl8.6 does not recognize -profile, and only Tcl 9.0 makes strict the default. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com>
Diffstat (limited to 'lib/commit.tcl')
-rw-r--r--lib/commit.tcl6
1 files changed, 3 insertions, 3 deletions
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]