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

Re: [PATCH] gitk: UTF-8 support

From
PRPavel Roskin <proski@gnu.org>
Date
Nov 24, 2005, 04:53 UTC
Message-ID
<20051123235315.oht0zjidc4ccg8gs@webmail.spamcop.net>
In-Reply-To
<7v64qi50sw.fsf@assigned-by-dhcp.cox.net>
Hello!
Quoting Junio C Hamano <junkio@cox.net>:
Show 13 quoted lines
> Pavel Roskin <proski@gnu.org> writes:
>
> > Add gitencoding variable and set it to "utf-8".  Use it for converting
> > git-rev-list output.
>
> Sounds good, but is it necessary?  Unless I am grossly mistaken,
> I am opposed to this patch.
>
> When I run gitk with LANG and/or LC_CTYPE set to ja_JP.utf8 (I
> suspect *whatever*.utf8 would work the same way) on git.git
> repository, I see Lukas's name (originally in iso8859-1 but my
> commit objects have it in utf8) and Yoshifuji-san's name
> (iso2022 converted to utf8) just fine.
I see.  I always use C locale.
Show 5 quoted lines
> And when I run gitk with LANG and/or LC_CTYPE set to ja_JP.ujis
> (that is another name for EUC-JP) on a toy repository I have
> commit log messages in EUC-JP (I am not recommending that, just
> pointing out a possibility), I can see them just fine.  In that
> test repository, setting locale to *.utf8 would not work.

Then what would you do to work with a repository using utf-8 if the current locale is not utf-8?

> So I suspect your change breaks projects that use local
> encodings, without fixing or adding anything new.

I'll be away from any sane OS until Monday, but I assume my patch should help those whose locale is set to an encoding other than utf-8 if they want to use a repository using utf-8.

Anyway, I see your point. Not ever git repository uses utf-8. It is not enforced by git.

So we have two solutions. One is to enforce utf-8 locale in git and force all "offenders" to convert. That's probably too intrusive for now.

The other solution is to have a publicly available file under .git that would keep the encoding name for the metadata (user names, logs etc). gitk could use that file now. git could implement conversions a bit later. Maybe git could warn about mismatching encoding as the first step.

-- Regards, Pavel Roskin

Previous: Paul MackerrasNext: Junio C Hamano
Message 4 of 8 in “gitk: UTF-8 support”
  1. gitk: UTF-8 supportPavel Roskin, Nov 23, 2005
  2. Junio C HamanoNov 24, 2005
  3. Paul MackerrasNov 24, 2005
  4. Pavel RoskinNov 24, 2005
  5. Junio C HamanoNov 24, 2005
  6. Pavel RoskinNov 24, 2005
  7. Junio C HamanoNov 28, 2005
  8. Pavel RoskinNov 28, 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.