git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Nico -telmich- Schottelius <nico-linux-git@schottelius.org>
Cc: Git Mailing List <git@vger.kernel.org>,
	Christian Gierke <ch@gierke.de>,
	Peter Portmann <peter.portmann@sygroup.ch>
Subject: Re: gitweb: charset problem
Date: Mon, 24 Oct 2005 14:34:57 +0200	[thread overview]
Message-ID: <20051024123457.GA30550@vrfy.org> (raw)
In-Reply-To: <20051024071839.GB4608@schottelius.org>

On Mon, Oct 24, 2005 at 09:18:39AM +0200, Nico -telmich- Schottelius wrote:
> gitweb (my $version =           "247";) seems to send utf-8 as meta tag encoding
> (<meta http-equiv="content-type" content="text/html; charset=utf-8"/>).

Yes, that's is intentional, also the http header is overwritten, if the
webserver's default is not utf8.

> The problem is that the name of the user "HansjOErg" (OE is the german umlaut)
> is in iso8859-1 in /etc/passwd.

Huh, not sure if it's a good idea to put that into a username,
never tried or ever seen that.

> This is guessed, but it does not look like utf-8, as it's a one byte encoding:
> 
> 00007b0: 3031 323a 3130 303a 4861 6e73 6af6 7267  012:100:Hansj.rg

Sure, 0xf6 is the single letter 'ö' (oe) in iso-8859.

> What would be the correct way to fix that? Change the username to utf-8?
> (Is this possible without causing problems in other programs?)
> Or tell gitweb that it should convert non-UTF-8 to UTF-8?

Don't know. At best get rid of the non-ascii chars in /etc/passwd
if you don't want to get in trouble... :)

All other programs sure, should definitely use utf8.

> But we also have another problem: Sometimes we have umlauts in the commit messages.
> Those are also displayed incorrectly. When I switch to iso-8859-1 encoding in mozilla,
> the characters in the username and in the commit message are ok.

utf8 is the one and only sane encoding if you need more than ascii chars.
Just convert everything to utf8 from your locale to your webserver and
all that pain will go away immediately. :)

Best,
Kay

  reply	other threads:[~2005-10-24 12:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24  7:18 gitweb: charset problem Nico -telmich- Schottelius
2005-10-24 12:34 ` Kay Sievers [this message]
2005-10-24 13:56 ` Horst von Brand
2005-10-24 21:55   ` Daniel Barkalow
2005-10-24 22:39     ` Junio C Hamano
2005-10-25 16:01       ` Daniel Barkalow
2005-10-25 17:31         ` Junio C Hamano
2005-10-25 17:44         ` Junio C Hamano

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=20051024123457.GA30550@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=ch@gierke.de \
    --cc=git@vger.kernel.org \
    --cc=nico-linux-git@schottelius.org \
    --cc=peter.portmann@sygroup.ch \
    /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).