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

Re: [BUG] git gui and my ö

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 24, 2007, 05:39 UTC
Message-ID
<20070424053935.GO17480@spearce.org>
In-Reply-To
<20070423113225.GA5427@lala>
Uwe Kleine-K??nig <ukleinek@informatik.uni-freiburg.de> wrote:
Show 11 quoted lines
> 	commit-tree failed:
> 
> 	<sha1 sum>
> 	Warning: commit message does not conform to UTF-8.
> 	You may ...
> 
> The commit was done with git-commit, I have 
> 
> 	zeisberg@cassiopeia:~$ set | grep -E '^L(ANG|C_)'
> 	LANG=en_US.UTF-8
> 	LC_CTYPE=en_US.UTF-8

What does your git-config think is the value of i18n.commitencoding? If its unset git-gui assumes utf-8 as the encoding. Hmm...

This particular code is around line 1287 of git-gui:
   1287     # -- Build the message.
   1288     #
   1289     set msg_p [gitdir COMMIT_EDITMSG]
   1290     set msg_wt [open $msg_p w]
   1291     if {[catch {set enc $repo_config(i18n.commitencoding)}]} {
   1292         set enc utf-8
   1293     }
   1294     fconfigure $msg_wt -encoding $enc -translation binary
   1295     puts -nonewline $msg_wt $msg
   1296     close $msg_wt

We should be writing the commit message (here $msg) out to a temporary file ($msg_p / $msg_t), using a UTF-8 encoding ($enc). Apparently that's not what's happening here. I wonder if the Tk text widget is feeding me UTF-8, and the way I have configured the file channel Tcl is than mangling things futher... *sigh*

Anyone reading this a better Tcl guru than I?

I'll try to take a look at this tomorrow. I'll have to figure out how to get your proper name into git-gui first. :-)

I had thought I had most of git-gui i8n safe, but apparently not. Thanks for the bug report!

-- 
Shawn.
Previous: Uwe Kleine-KönigNext: Shawn O. Pearce
Message 2 of 4 in “[BUG] git gui and my ö”
  1. Uwe Kleine-KönigApr 23, 2007
  2. Shawn O. PearceApr 24, 2007
  3. Shawn O. PearceApr 24, 2007
  4. Uwe Kleine-KönigApr 24, 2007

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.