git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Langhoff" <martin.langhoff@gmail.com>
To: sf <sf@b-i-t.de>
Cc: git@vger.kernel.org
Subject: Re: Non-ASCII paths and git-cvsserver
Date: Fri, 10 Nov 2006 15:59:09 -0300	[thread overview]
Message-ID: <46a038f90611101059h1844bae8o9cc9d986eaaddd7b@mail.gmail.com> (raw)
In-Reply-To: <45530CEE.6030008@b-i-t.de>

On 11/9/06, sf <sf@b-i-t.de> wrote:
> I want to access a git repository via git-cvsserver. The problem is that
> the repository contains paths with umlauts. These paths come out quoted
> and escaped when checked out with cvs.

Thanks for the detailed report! I am travelling right now, so with
"high latency" and on a machine that's missing sqlite libs :-/

But I'll give it a go anyway.

Does this mini-patch help? You'll need Perl 5.8.x and probably a
recent SQLite for this.

diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 8817f8b..c534de5 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -22,6 +22,9 @@ use Fcntl;
 use File::Temp qw/tempdir tempfile/;
 use File::Basename;

+binmode(STDIN,  ':utf8');
+binmode(STDOUT, ':utf8');
+
 my $log = GITCVS::log->new();
 my $cfg;

@@ -2104,6 +2107,11 @@ sub new
         $self->{tables}{$table} = 1;
     }

+    # this will set the encoding for new DBs
+    # or return false for existing DBs that are not
+    # utf-8
+    $self->{dbh}->do('PRAGMA encoding = "UTF-8"');
+
     # Construct the revision table if required
     unless ( $self->{tables}{revision} )

  reply	other threads:[~2006-11-10 18:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 11:11 Non-ASCII paths and git-cvsserver sf
2006-11-10 18:59 ` Martin Langhoff [this message]
2006-11-10 19:49 ` Junio C Hamano
2006-11-13 13:58   ` sf
2006-11-13 14:20     ` Jakub Narebski
2006-11-13 18:30       ` Robin Rosenberg
2006-11-13 18:57         ` Jakub Narebski
2006-11-13 21:41           ` Robin Rosenberg
2006-11-13 19:48         ` Junio C Hamano
2006-11-13 18:22     ` Martin Langhoff
2006-11-14 10:40       ` sf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46a038f90611101059h1844bae8o9cc9d986eaaddd7b@mail.gmail.com \
    --to=martin.langhoff@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sf@b-i-t.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).