git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitweb: charset problem

From
Horst von Brand <vonbrand@inf.utfsm.cl>
Date
Oct 24, 2005, 13:56 UTC
Message-ID
<200510241356.j9ODuAHn005060@laptop11.inf.utfsm.cl>
In-Reply-To
<nico-linux-git@schottelius.org>
Nico -telmich- Schottelius <nico-linux-git@schottelius.org> 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"/>).
> The problem is that the name of the user "HansjOErg" (OE is the german
> umlaut) is in iso8859-1 in /etc/passwd.  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
> 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?

I'd be /very/ wary of usernames that aren't plain ASCII, just lovercase letters and digits, not starting with a digit, at most 8 characters long. I've seen more than enough hard-to-debug funnies in the most surprising places otherwise.

> 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.

I believe the Emperor Penguin decreed messages have to be ASCII, or else UTF-8. Please don't add to the mess by using non-portable encodings!

-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
Next: Daniel Barkalow
Message 1 of 6 in “Re: gitweb: charset problem”
  1. Horst von BrandOct 24, 2005
  2. Daniel BarkalowOct 24, 2005
  3. Junio C HamanoOct 24, 2005
  4. Daniel BarkalowOct 25, 2005
  5. Junio C HamanoOct 25, 2005
  6. Junio C HamanoOct 25, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.