From: Martin Langhoff Date: Fri, 10 Nov 2006 18:59:09 GMT Subject: Re: Non-ASCII paths and git-cvsserver Message-ID: <46a038f90611101059h1844bae8o9cc9d986eaaddd7b@mail.gmail.com> In-Reply-To: <45530CEE.6030008@b-i-t.de> On 11/9/06, sf 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} )