Fixes for Bug 2600, HTML tags in titles not escaped in many places
[koha.git] / misc / exportauth.pl
blob52a0ec897175a3185c69467ed12428576b61b8d7
1 #!/usr/bin/perl
2 ## This script allows you to export a rel_2_2 bibliographic db in
3 #MARC21 format from the command line.
6 use strict;
7 BEGIN {
8 # find Koha's Perl modules
9 # test carefully before changing this
10 use FindBin;
11 eval { require "$FindBin::Bin/kohalib.pl" };
14 use C4::Context;
15 use C4::Output; # contains gettemplate
16 use C4::Biblio;
17 use C4::Auth;
18 my $outfile = $ARGV[0];
19 open(OUT,">$outfile") or die $!;
20 my $dbh=C4::Context->dbh;
21 #$dbh->do("set character_set_client='latin5'");
22 $dbh->do("set character_set_connection='utf8'");
23 #$dbh->do("set character_set_results='latin5'");
24 my $sth=$dbh->prepare("select marc from auth_header order by authid");
25 $sth->execute();
26 while (my ($marc) = $sth->fetchrow) {
27 print OUT $marc;
29 close(OUT);