Lines 478-486
sub ImportBreedingAuth {
Link Here
|
478 |
|
478 |
|
479 |
my $controlnumber = $marcrecord->field('001')->data; |
479 |
my $controlnumber = $marcrecord->field('001')->data; |
480 |
|
480 |
|
481 |
# Normalize the record so it doesn't have separated diacritics |
|
|
482 |
SetUTF8Flag($marcrecord); |
483 |
|
484 |
$searchbreeding->execute($controlnumber,$heading); |
481 |
$searchbreeding->execute($controlnumber,$heading); |
485 |
my ($breedingid) = $searchbreeding->fetchrow; |
482 |
my ($breedingid) = $searchbreeding->fetchrow; |
486 |
|
483 |
|
Lines 588-593
sub Z3950SearchAuth {
Link Here
|
588 |
$marcrecord->encoding('UTF-8'); |
585 |
$marcrecord->encoding('UTF-8'); |
589 |
} else { |
586 |
} else { |
590 |
( $marcrecord, $charset_result, $charset_errors ) = MarcToUTF8Record( $marcdata, $marc_type, $encoding[$k] ); |
587 |
( $marcrecord, $charset_result, $charset_errors ) = MarcToUTF8Record( $marcdata, $marc_type, $encoding[$k] ); |
|
|
588 |
if( !@$charset_errors ) { |
589 |
$marcrecord->encoding('UTF-8'); |
590 |
SetUTF8Flag($marcrecord); |
591 |
} else { |
592 |
require Data::Dumper; warn Data::Dumper::Dumper( 'Z3950SearchAuth conversion error', $charset_result, $charset_errors ); |
593 |
next; # skip this one |
594 |
} |
591 |
} |
595 |
} |
592 |
my $heading; |
596 |
my $heading; |
593 |
my $heading_authtype_code; |
597 |
my $heading_authtype_code; |
Lines 596-602
sub Z3950SearchAuth {
Link Here
|
596 |
|
600 |
|
597 |
$heading = GetAuthorizedHeading({ record => $marcrecord }); |
601 |
$heading = GetAuthorizedHeading({ record => $marcrecord }); |
598 |
|
602 |
|
599 |
my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], $encoding[$k], $heading ); |
603 |
my $breedingid = ImportBreedingAuth( $marcrecord, $serverhost[$k], 'UTF-8', $heading ); |
|
|
604 |
|
600 |
my %row_data; |
605 |
my %row_data; |
601 |
$row_data{server} = $servers[$k]->{'servername'}; |
606 |
$row_data{server} = $servers[$k]->{'servername'}; |
602 |
$row_data{breedingid} = $breedingid; |
607 |
$row_data{breedingid} = $breedingid; |
603 |
- |
|
|