{"thread":{"id":"22100","subject":"[PATCH RFC] gitk: display submodule diffs with appropriate encoding","startedAt":"2010-01-05T12:44:54Z","lastAt":"2010-01-12T11:23:02Z","messageCount":2,"participants":["Kirill Smelkov","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"130842","messageId":"1262695494-27975-1-git-send-email-kirr@landau.phys.spbu.ru","threadId":"22100","inReplyTo":null,"subject":"[PATCH RFC] gitk: display submodule diffs with appropriate encoding","fromName":"Kirill Smelkov","fromEmail":"kirr@landau.phys.spbu.ru","sentAt":"2010-01-05T12:44:54Z","receivedAt":"2010-01-05T12:44:54Z","isPatch":true,"sender":{"key":"kirr@navytux.spb.ru","avatar":"https://gravatar.com/avatar/cf3445fdad1849941e17ab25bf1ee7c5ea1be2deb444be25ff5f36b0e50a985f?d=mp&s=160"},"body":"Previsously, when submodule commits headings contained non-latin-1\ncharacters, they were displayed incorrectly in gitk, because $line was\nnot properly decoded, i.e.\n\n----------------------------- Documentation/Dokko -----------------------------\nSubmodule Documentation/Dokko 2ca20c7..0ea204d:\n  > ÃÂÃÂÃÂ¾ÃÂÃÂ¾ÃÂºÃÂ¾ÃÂ»ÃÂ ÃÂÃÂ¾ÃÂ¿ÃÂÃÂÃÂ¶ÃÂµÃÂ½ÃÂ¸ÃÂ ÃÂÃÂÃÂ¡ \"ÃÂÃÂ¾ÃÂÃÂÃÂ¸ÃÂº-21631\"  (ÃÂÃÂ2 ÃÂ¸ ÃÂ¡ÃÂ°ÃÂ½ÃÂ´ÃÂ°ÃÂ»)\n  > hardware: ÃÂ´ÃÂ¾ÃÂºÃÂÃÂ¼ÃÂµÃÂ½ÃÂÃÂ°ÃÂÃÂ¸ÃÂ ÃÂ½ÃÂ° InnoDisk SATA 10000\n  > hardware: ÃÂ´ÃÂ¾ÃÂºÃÂÃÂ¼ÃÂµÃÂ½ÃÂÃÂ°ÃÂÃÂ¸ÃÂ ÃÂ½ÃÂ° IEI PCISA-6770E2 v3.0\n  > hardware: ÃÂ´ÃÂ¾ÃÂºÃÂÃÂ¼ÃÂµÃÂ½ÃÂÃÂ°ÃÂÃÂ¸ÃÂ ÃÂ½ÃÂ° Fastwel NIB941\n  > hardware: ÃÂ´ÃÂ¾ÃÂºÃÂÃÂ¼ÃÂµÃÂ½ÃÂÃÂ°ÃÂÃÂ¸ÃÂ ÃÂ½ÃÂ° IEI IPX-9S\n  > hardware: ÃÂ´ÃÂ¾ÃÂºÃÂÃÂ¼ÃÂµÃÂ½ÃÂÃÂ°ÃÂÃÂ¸ÃÂ ÃÂ½ÃÂ° Hirschmann 5TX-EEC\n\n\ninstead of\n\n----------------------------- Documentation/Dokko -----------------------------\nSubmodule Documentation/Dokko 2ca20c7..0ea204d:\n  > ÐÑÐ¾ÑÐ¾ÐºÐ¾Ð»Ñ ÑÐ¾Ð¿ÑÑÐ¶ÐµÐ½Ð¸Ñ ÐÐÐ¡ \"ÐÐ¾ÑÑÐ¸Ðº-21631\"  (ÐÐ2 Ð¸ Ð¡Ð°Ð½Ð´Ð°Ð»)\n  > hardware: Ð´Ð¾ÐºÑÐ¼ÐµÐ½ÑÐ°ÑÐ¸Ñ Ð½Ð° InnoDisk SATA 10000\n  > hardware: Ð´Ð¾ÐºÑÐ¼ÐµÐ½ÑÐ°ÑÐ¸Ñ Ð½Ð° IEI PCISA-6770E2 v3.0\n  > hardware: Ð´Ð¾ÐºÑÐ¼ÐµÐ½ÑÐ°ÑÐ¸Ñ Ð½Ð° Fastwel NIB941\n  > hardware: Ð´Ð¾ÐºÑÐ¼ÐµÐ½ÑÐ°ÑÐ¸Ñ Ð½Ð° IEI IPX-9S\n  > hardware: Ð´Ð¾ÐºÑÐ¼ÐµÐ½ÑÐ°ÑÐ¸Ñ Ð½Ð° Hirschmann 5TX-EEC\n\n\nThis fixes it.\n\nSigned-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>\n---\n gitk |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 86dff0f..0edef8f 100755\n--- a/gitk\n+++ b/gitk\n@@ -7689,8 +7689,10 @@ proc getblobdiffline {bdf ids} {\n \t    makediffhdr $fname $ids\n \t    $ctext insert end \"\\n$line\\n\" filesep\n \t} elseif {![string compare -length 3 \"  >\" $line]} {\n+\t    set line [encoding convertfrom $diffencoding $line]\n \t    $ctext insert end \"$line\\n\" dresult\n \t} elseif {![string compare -length 3 \"  <\" $line]} {\n+\t    set line [encoding convertfrom $diffencoding $line]\n \t    $ctext insert end \"$line\\n\" d0\n \t} elseif {$diffinhdr} {\n \t    if {![string compare -length 12 \"rename from \" $line]} {\n-- \n1.6.6.78.gbd757c.dirty\n"},{"id":"131367","messageId":"20100112112302.GF6685@brick.ozlabs.ibm.com","threadId":"22100","inReplyTo":"1262695494-27975-1-git-send-email-kirr@landau.phys.spbu.ru","subject":"Re: [PATCH RFC] gitk: display submodule diffs with appropriate encoding","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2010-01-12T11:23:02Z","receivedAt":"2010-01-12T11:23:02Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, Jan 05, 2010 at 03:44:54PM +0300, Kirill Smelkov wrote:\n\n> Previsously, when submodule commits headings contained non-latin-1\n> characters, they were displayed incorrectly in gitk, because $line was\n> not properly decoded, i.e.\n\nThanks, applied.\n\nPaul.\n"}]}