Re: Encoding problems using git-svn
- From
- James North <tocapicha@gmail.com>
- Date
- Oct 30, 2008, 03:28 UTC
- Message-ID
- <8b168cfb0810292028x225202b9hece862a350440472@mail.gmail.com>
- In-Reply-To
- <8b168cfb0810282014r789ac01dnec51824de1078f0@mail.gmail.com>
Ok, I made a quick change in git-svn script and seems like is working now in my system with locale set to iso-8859-1.
Dunno if this is the right place to post this, but I hope someone knowledgeable see this and tells if this would work as a general fix.
This patch is against 1.6.0.2
--- git-svn 2008-09-15 13:04:46.000000000 +0200 +++ git-svn.mine 2008-10-30 04:21:09.000000000 +0100
@@ -43,6 +43,7 @@ use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/; use IPC::Open3; use Git; +use Encode; BEGIN { # import functions from Git into our packages, en masse @@ -1061,6 +1062,7 @@ && !$saw_from) { $msgbuf .= "\n\nFrom: $author"; } + $msgbuf = encode("utf8", $msgbuf); print $log_fh $msgbuf or croak $!; command_close_pipe($msg_fh, $ctx); } On Wed, Oct 29, 2008 at 4:14 AM, James North <tocapicha@gmail.com> wrote: > Hi, > > I'm using git-svn on a system with ISO-8859-1 encoding. The problem is > when I try to use "git svn dcommit" to send changes to a remote svn > (also ISO-8859-1). > > Seems like git-svn is sending commit messages with utf-8 (just a > guessing...) and they look bad on the remote svn log. E.g. "Ca?\241a > de cami?\243n" > > I have tried using i18n.commitencoding=ISO-8859-1 as suggested by the > warning when doing "git svn dcommit" but messages still are sent with > wrong encoding. > > I'm mising something? > > Thanks everyone >