From: Tobias Getzner <tobias.getzner@gmx.de>
To: git@vger.kernel.org
Subject: [BUG] Mojibake in git gui and gitk for certain unicode chars
Date: Thu, 22 Jan 2015 12:43:21 +0100 [thread overview]
Message-ID: <1421927001.11296.27.camel@gmx.de> (raw)
Hello,
I’ve noticed git gui and gitk seem to have problems decoding certain
unicode characters. E.g., when a commit contains the character «👍»
(thumbs up sign; U+1F44D) in UTF-8 encoding, this character will show
as «ð» in gitk. git gui also displays it using the same sequence.
When trying to stage lines within the context of such characters, the
program will error out (corrupt patch).
The character sequence appears to be mojibake introduced by decoding
UTF-8 as ISO-8859-1. However, my locale is set to «en_US.utf8». git gui
is also set to assume UTF-8 encoding for files, and in the list menu
where this encoding is selected, it lists the UTF-8 option under
«system encoding», which suggests that my locale is correctly picked
up.
Is there perchance any heuristics in place which tries decoding files
as unicode, with a fall-back to latin1? If so, then potentially the bug
could be due to U+1F44D tripping up the decoder, triggering a
fall-back, and rendering the characters as mojibake.
I’ve noticed a perhaps related glitch when the options in git gui is
shown. My committer name contains the character «ß» (latin small letter
sharp s; U+00DF). The text field in the options dialog displays this as
«Ã», which also seems to be UTF-8 to latin1 mojibake. Curiously, the
same character displays just fine when staging parts of files via git
gui, so the issue is not quite the same as the one described above.
Best regards,
Tobias
next reply other threads:[~2015-01-22 11:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 11:43 Tobias Getzner [this message]
2015-01-22 12:18 ` [BUG] Mojibake in git gui and gitk for certain unicode chars Tobias Getzner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421927001.11296.27.camel@gmx.de \
--to=tobias.getzner@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).