{"thread":{"id":"38428","subject":"[BUG] Mojibake in git gui and gitk for certain unicode chars","startedAt":"2015-01-22T11:43:21Z","lastAt":"2015-01-22T12:18:22Z","messageCount":2,"participants":["Tobias Getzner"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"255080","messageId":"1421927001.11296.27.camel@gmx.de","threadId":"38428","inReplyTo":null,"subject":"[BUG] Mojibake in git gui and gitk for certain unicode chars","fromName":"Tobias Getzner","fromEmail":"tobias.getzner@gmx.de","sentAt":"2015-01-22T11:43:21Z","receivedAt":"2015-01-22T11:43:21Z","isPatch":false,"sender":{"key":"tobias.getzner@gmx.de","avatar":null},"body":"Hello,\n\nI’ve noticed git gui and gitk seem to have problems decoding certain\nunicode characters. E.g., when a commit contains the character «👍»\n(thumbs up sign; U+1F44D) in UTF-8 encoding, this character will show\nas «ð» in gitk. git gui also displays it using the same sequence.\nWhen trying to stage lines within the context of such characters, the\nprogram will error out (corrupt patch).\n\nThe character sequence appears to be mojibake introduced by decoding\nUTF-8 as ISO-8859-1. However, my locale is set to «en_US.utf8». git gui\nis also set to assume UTF-8 encoding for files, and in the list menu\nwhere this encoding is selected, it lists the UTF-8 option under\n«system encoding», which suggests that my locale is correctly picked\nup.\n\nIs there perchance any heuristics in place which tries decoding files\nas unicode, with a fall-back to latin1? If so, then potentially the bug\ncould be due to U+1F44D tripping up the decoder, triggering a\nfall-back, and rendering the characters as mojibake.\n\nI’ve noticed a perhaps related glitch when the options in git gui is\nshown. My committer name contains the character «ß» (latin small letter\nsharp s; U+00DF). The text field in the options dialog displays this as\n«Ã», which also seems to be UTF-8 to latin1 mojibake. Curiously, the\nsame character displays just fine when staging parts of files via git\ngui, so the issue is not quite the same as the one described above.\n\nBest regards,\nTobias\n"},{"id":"255084","messageId":"1421929102.22955.3.camel@gmx.de","threadId":"38428","inReplyTo":"1421927001.11296.27.camel@gmx.de","subject":"Re: [BUG] Mojibake in git gui and gitk for certain unicode chars","fromName":"Tobias Getzner","fromEmail":"tobias.getzner@gmx.de","sentAt":"2015-01-22T12:18:22Z","receivedAt":"2015-01-22T12:18:22Z","isPatch":false,"sender":{"key":"tobias.getzner@gmx.de","avatar":null},"body":"On Do, 2015-01-22 at 12:43 +0100, Tobias Getzner wrote:\n> Hello,\n> \n> I’ve noticed git gui and gitk seem to have problems decoding certain\n> unicode characters. E.g., when a commit contains the character «👍»\n> (thumbs up sign; U+1F44D) in UTF-8 encoding, this character will show\n> as «ð» in gitk. \n\n> I’ve noticed a perhaps related glitch when the options in git gui is\n> shown. My committer name contains the character «ß» (latin small letter\n> sharp s; U+00DF). The text field in the options dialog displays this as\n> «Ã»,\n\nI suppose that some of the mojibake characters in the message might\nhave been stripped out of the message because they are control chars.\nSo, «👍» was rendered as «ð\\x9f\\x91\\x8d». «ß» was rendered as «Ã\\x9f».\n"}]}