On 11/9/06, sf [off-list ref] 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} )