git-gui: Use gitattribute "encoding" for file content display
[gitweb.git] / lib / blame.tcl
index 0d635cd3a7152402e2363d8f9fb041bdd4835f14..9464a599dca8b0bcf16a9f6e10bc6f43a6bb5270 100644 (file)
@@ -399,7 +399,10 @@ method _load {jump} {
        } else {
                set fd [git_read cat-file blob "$commit:$path"]
        }
-       fconfigure $fd -blocking 0 -translation lf -encoding binary
+       fconfigure $fd \
+               -blocking 0 \
+               -translation lf \
+               -encoding [tcl_encoding [gitattr $path encoding UTF-8]]
        fileevent $fd readable [cb _read_file $fd $jump]
        set current_fd $fd
 }