Re: Encoding problems using git-svn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux