Skip to content

gitk: Fixing file name encoding issues #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -8346,6 +8346,7 @@ proc parseblobdiffline {ids line} {
if {$type eq "--cc"} {
# start of a new file in a merge diff
set fname [string range $line 10 end]
set fname [encoding convertfrom utf-8 $fname]
if {[lsearch -exact $treediffs($ids) $fname] < 0} {
lappend treediffs($ids) $fname
add_flist [list $fname]
Expand Down Expand Up @@ -8379,6 +8380,7 @@ proc parseblobdiffline {ids line} {

} elseif {![string compare -length 16 "* Unmerged path " $line]} {
set fname [encoding convertfrom utf-8 [string range $line 16 end]]
set line [encoding convertfrom utf-8 $line]
$ctext insert end "\n"
set curdiffstart [$ctext index "end - 1c"]
lappend ctext_file_names $fname
Expand Down Expand Up @@ -12519,6 +12521,7 @@ catch {
if {$gitencoding == ""} {
set gitencoding "utf-8"
}
encoding system utf-8
set tclencoding [tcl_encoding $gitencoding]
if {$tclencoding == {}} {
puts stderr "Warning: encoding $gitencoding is not supported by Tcl/Tk"
Expand Down