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

Re: Encoding problems using git-svn

From
JNJames 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
>
Previous: James NorthNext: Eric Wong
Message 2 of 6 in “Encoding problems using git-svn”
  1. James NorthOct 29, 2008
  2. James NorthOct 30, 2008
  3. Eric WongOct 30, 2008
  4. James NorthOct 30, 2008
  5. Eric WongNov 2, 2008
  6. Robin RosenbergNov 2, 2008

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.