Have you tried with the net installer? It might be that the issue is
already fixed in the developer version.
To start with, I've fixed the "explicitely" typo (not sure whether this
will make it into the upcoming release) and created a setup from the
current code base. Would you mind testing this unofficial installer:
What happens if you set the HOME variable explicitely, as suggested by the
error in Git Bash?
FWIW I did not mean that you should edit /etc/profile. I meant that you
should set the HOME environment variable (in case you do not know how to do
that on Windows: right-click on the "My Computer" symbol,
choose "Properties" from the context menu, and then click on
the "Environment" tab).
I understood what you meant, but I thought what I did it was equivalent to
setting the HOME environment variable. I didn't do it that way because I
thought I'd installed msysgit in a mode that doesn't make use of global
environment variables (but I may have misunderstood the install options).
Anyway, I can't see what relation this has with the issue.
ajriesgo: it is quite possible that the HOME variable is interpreted before
/etc/profile is even read, and that subsequent changes to the HOME variable
are ignored. It is also quite possible that setting the HOME variable fixes
the encoding issues you see (at least way back when I tested it, it
helped). This would help understanding the issue, so that you could work on
a patch that fixes the issue by fixing the encoding even if the user did
not set HOME explicitly.
Comment #11 on issue 491 by sschu...@gmail.com: Multiple errors when
installing msysgit with a Windows user name that has non-ASCII characters
http://code.google.com/p/msysgit/issues/detail?id=491
First of all, please note that the issue tracker is not in use anymore, any
issues should be reported / discussed on the mailing list.
Secondly, as a last remark before closing this issue, make sure you're
using a TrueType font for the console, and maybe try changing the console
font, and report back on the mailing list whether that solves your issue.
Thanks!
If you type in a commit message and exit git gui, it saves that
messsage to .git/GITGUI_MSG so you don't have to re-enter the message
next time. However, the code for this does not specify the encoding of
this file so it will default to the current system encoding which can
fail to correctly handle unicode strings. The following patch should
sort this out for you.
From 207b7dbf6c94adcaba46b6af1bb515a23dce3927 Mon Sep 17 00:00:00 2001
From: Pat Thoyts <patt...@users.sourceforge.net>
Date: Thu, 19 Apr 2012 11:19:58 +0100
Subject: [PATCH] git-gui: preserve commit messages in utf-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The commit message buffer is automatically preserved to a local file
but this uses the system encoding which may fail to properly encode
unicode text. Forcing this file to use utf-8 preserves the message
correctly.
Reported-by: Ángel José Riesgo <ajri...@gmail.com>
Signed-off-by: Pat Thoyts <patt...@users.sourceforge.net>
---
git-gui.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index ba4e5c1..2360cb1 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1463,7 +1463,7 @@ proc rescan {after {honor_trustmtime 1}} {
(![$ui_comm edit modified]
|| [string trim [$ui_comm get 0.0 end]] eq {})} {
if {[string match amend* $commit_type]} {
- } elseif {[load_message GITGUI_MSG]} {
+ } elseif {[load_message GITGUI_MSG utf-8]} {
} elseif {[run_prepare_commit_msg_hook]} {
} elseif {[load_message MERGE_MSG]} {
} elseif {[load_message SQUASH_MSG]} {
@@ -1549,7 +1549,7 @@ proc rescan_stage2 {fd after} {
fileevent $fd_lo readable [list read_ls_others $fd_lo $after]
}
-proc load_message {file} {
+proc load_message {file {encoding {}}} {
global ui_comm
set f [gitdir $file]
@@ -1558,6 +1558,9 @@ proc load_message {file} {
return 0
}
fconfigure $fd -eofchar {}
+ if {$encoding ne {}} {
+ fconfigure $fd -encoding $encoding
+ }
set content [string trim [read $fd]]
close $fd
regsub -all -line {[ \r\t]+$} $content {} content
@@ -2266,6 +2269,7 @@ proc do_quit {{rc {1}}} {
&& $msg ne {}} {
catch {
set fd [open $save w]
+ fconfigure $fd -encoding utf-8
puts -nonewline $fd $msg
close $fd
}
@@ -3835,7 +3839,7 @@ if {[is_enabled transport]} {
}
if {[winfo exists $ui_comm]} {
- set GITGUI_BCK_exists [load_message GITGUI_BCK]
+ set GITGUI_BCK_exists [load_message GITGUI_BCK utf-8]
# -- If both our backup and message files exist use the
# newer of the two files to initialize the buffer.
@@ -3872,6 +3876,7 @@ if {[winfo exists $ui_comm]} {
} elseif {$m} {
catch {
set fd [open [gitdir GITGUI_BCK] w]
+ fconfigure $fd -encoding utf-8
puts -nonewline $fd $msg
close $fd
set GITGUI_BCK_exists 1
--
1.7.10.msysgit.1