{"thread":{"id":"46640","subject":"[PATCH] git-gui: Prevent double UTF-8 conversion","startedAt":"2017-08-21T11:53:38Z","lastAt":"2017-08-21T18:52:27Z","messageCount":2,"participants":["Łukasz Stelmach","Stefan Beller"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"326869","messageId":"20170821115313.11879-1-l.stelmach@samsung.com","threadId":"46640","inReplyTo":"CGME20170821115329eucas1p1c550891b502863669ca351de028f2b80@eucas1p1.samsung.com","subject":"[PATCH] git-gui: Prevent double UTF-8 conversion","fromName":"Łukasz Stelmach","fromEmail":"l.stelmach@samsung.com","sentAt":"2017-08-21T11:53:13Z","receivedAt":"2017-08-21T11:53:38Z","isPatch":true,"sender":{"key":"l.stelmach@samsung.com","avatar":"https://gravatar.com/avatar/b5f9262ad19b1b6f1e74b8eba816455e059742e8d980fdefa9321976071642fc?d=mp&s=160"},"body":"With encoding on the file descriptor set to \"binary\" Tcl (8.6 in my case)\ndoes double conversion which breaks e.g. author name in amended commits.\n\nFor example \"\\305\\201ukasz\" (as written by git cat-file) becomes\n\"\\303\\205\\302\\201ukasz\".\n\nSigned-off-by: Łukasz Stelmach <l.stelmach@samsung.com>\n---\n git-gui/lib/commit.tcl | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl\nindex 83620b7cb..bcb6499a0 100644\n--- a/git-gui/lib/commit.tcl\n+++ b/git-gui/lib/commit.tcl\n@@ -26,7 +26,7 @@ You are currently in the middle of a merge that has not been fully completed.  Y\n \tset parents [list]\n \tif {[catch {\n \t\t\tset fd [git_read cat-file commit $curHEAD]\n-\t\t\tfconfigure $fd -encoding binary -translation lf\n+\t\t\tfconfigure $fd -encoding utf-8 -translation lf\n \t\t\t# By default commits are assumed to be in utf-8\n \t\t\tset enc utf-8\n \t\t\twhile {[gets $fd line] > 0} {\n-- \n2.11.0\n\n"},{"id":"326900","messageId":"CAGZ79kZ7s8Y0M=5g8skhcONo=r9Y+MiHp3=+E1JTL4zNE_4v+g@mail.gmail.com","threadId":"46640","inReplyTo":"20170821115313.11879-1-l.stelmach@samsung.com","subject":"Re: [PATCH] git-gui: Prevent double UTF-8 conversion","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2017-08-21T18:52:12Z","receivedAt":"2017-08-21T18:52:27Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"+cc git gui maintainer\n\nOn Mon, Aug 21, 2017 at 4:53 AM, Łukasz Stelmach <l.stelmach@samsung.com> wrote:\n> With encoding on the file descriptor set to \"binary\" Tcl (8.6 in my case)\n> does double conversion which breaks e.g. author name in amended commits.\n>\n> For example \"\\305\\201ukasz\" (as written by git cat-file) becomes\n> \"\\303\\205\\302\\201ukasz\".\n>\n> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>\n> ---\n>  git-gui/lib/commit.tcl | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl\n> index 83620b7cb..bcb6499a0 100644\n> --- a/git-gui/lib/commit.tcl\n> +++ b/git-gui/lib/commit.tcl\n> @@ -26,7 +26,7 @@ You are currently in the middle of a merge that has not been fully completed.  Y\n>         set parents [list]\n>         if {[catch {\n>                         set fd [git_read cat-file commit $curHEAD]\n> -                       fconfigure $fd -encoding binary -translation lf\n> +                       fconfigure $fd -encoding utf-8 -translation lf\n>                         # By default commits are assumed to be in utf-8\n>                         set enc utf-8\n>                         while {[gets $fd line] > 0} {\n> --\n> 2.11.0\n>\n"}]}