X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=sync.pl;h=113df7d93ba04ae3b0cc07ce0696016c8e145bab;hb=fde909c294de9806dd6337f5acb0ed87c41557c6;hp=c57325965d93c9e4acf381bc057aff128f7ecbe9;hpb=b93be431f59d23a11caf564945e2c1f6081ecc73;p=wloh diff --git a/sync.pl b/sync.pl index c573259..113df7d 100755 --- a/sync.pl +++ b/sync.pl @@ -13,7 +13,6 @@ sub copy_escape { if (!defined($x)) { return '\N'; } - $x = Encode::decode('iso8859-1', $x); $x =~ s/([\\\r\n\t])/\\$1/g; return $x; } @@ -46,6 +45,7 @@ my $sdbh = DBI->connect($config::local_connstr, $config::local_username, $config or die "PostgreSQL connect: " . $DBI::errstr; $sdbh->{AutoCommit} = 0; $sdbh->{RaiseError} = 1; +$sdbh->do("SET client_encoding TO 'iso8859-1';"); # For our own enjoyment. sync_table($mdbh, $sdbh, "Fotballbrukere");