diff --git a/gitk b/gitk index d9812f2e9c..342b0aba8d 100755 --- a/gitk +++ b/gitk @@ -33,6 +33,19 @@ The version of git found is $git_version." exit 1 } +###################################################################### +## Enable Tcl8 profile in Tcl9, allowing consumption of data that has +## bytes not conforming to the assumed encoding profile. + +if {[package vcompare $::tcl_version 9.0] >= 0} { + rename open _strict_open + proc open args { + set f [_strict_open {*}$args] + chan configure $f -profile tcl8 + return $f + } +} + ###################################################################### ## ## Enabling platform-specific code paths