From: Jonathan Nieder <jrnieder@gmail.com>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: git@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales
Date: Sat, 20 Mar 2010 01:14:52 -0500 [thread overview]
Message-ID: <20100320061452.GA26224@progeny.tock> (raw)
In-Reply-To: <1268418709-4998-3-git-send-email-patthoyts@users.sourceforge.net>
Unless the ‘-encoding’ option is supplied, wish interprets source
files using the default system encoding, which depends on locale.
This can cause the copyright symbol to display incorrectly in gitk’s
about dialog.
The -encoding option was added to tcl in version 8.1.
Reported-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hi,
Pat Thoyts wrote:
> The script file uses utf-8 encoding but when sourced it will be read
> using the default system encoding which is never utf8 on windows. This
> causes the copyright symbol to display incorrectly in the about dialog.
I can reproduce this in Linux with LANG=de_DE@euro ./gitk.
> Using the unicode escape sequence avoids incorrect decoding but does
> require a double escape in the .po files.
When I tried applying your patch, running “make update-po” seemed to
undo its effect on translations. I am also worried about what would
happen in locales where ASCII is not a subset of the native character
set, or other uses of non-ASCII characters in the translated messages.
Maybe the following would be safer? I haven’t looked at the effect on
translations yet.
gitk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 1f36a3e..a7c9a9a 100755
--- a/gitk
+++ b/gitk
@@ -1,6 +1,6 @@
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
-exec wish "$0" -- "$@"
+exec wish -encoding utf-8 "$0" -- "$@"
# Copyright © 2005-2009 Paul Mackerras. All rights reserved.
# This program is free software; it may be used, copied, modified
--
1.7.0.2
next prev parent reply other threads:[~2010-03-20 6:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 18:31 [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Pat Thoyts
2010-03-12 18:31 ` [PATCH 2/3] gitk: Add emacs editor variable block Pat Thoyts
2010-03-12 18:31 ` [PATCH 3/3] gitk: fix display of copyright symbol Pat Thoyts
2010-03-20 6:14 ` Jonathan Nieder [this message]
2010-03-20 6:24 ` [PATCH squash] gitk: Update makefile to keep -encoding option for gitk-wish Jonathan Nieder
2010-03-22 22:58 ` [PATCH] gitk: Fix display of copyright symbol in non-utf-8 locales Pat Thoyts
2010-03-22 23:45 ` Jonathan Nieder
2010-03-20 6:32 ` [PATCH 1/3] gitk: Avoid calling tk_setPalette on Windows Jonathan Nieder
2010-03-22 22:52 ` Pat Thoyts
2010-03-23 2:29 ` Jonathan Nieder
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=20100320061452.GA26224@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=patthoyts@users.sourceforge.net \
--cc=paulus@samba.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).