From 6018d5de2d24275f286e00f94d354cbe7148b443 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 11 Oct 2012 14:39:20 +0200 Subject: [PATCH] 8610 Normalize imported Z3950 record Content-Type: text/plain; charset=utf-8 Aangepast voor 3.8 --- C4/Breeding.pm | 1 + C4/ImportBatch.pm | 1 + acqui/z3950_search.pl | 1 + cataloguing/z3950_search.pl | 1 + 4 files changed, 4 insertions(+), 0 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 0653d50..2959ecf 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -93,6 +93,7 @@ sub ImportBreeding { my ($marcrecord, $charset_result, $charset_errors); ($marcrecord, $charset_result, $charset_errors) = MarcToUTF8Record($marcarray[$i]."\x1D", C4::Context->preference("marcflavour"), $encoding); + SetUTF8Flag($marcrecord); # warn "$i : $marcarray[$i]"; # FIXME - currently this does nothing diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm index 386bac9..c69b836 100644 --- a/C4/ImportBatch.pm +++ b/C4/ImportBatch.pm @@ -330,6 +330,7 @@ sub BatchStageMarcRecords { } my ($marc_record, $charset_guessed, $char_errors) = MarcToUTF8Record($marc_blob, C4::Context->preference("marcflavour"), $encoding); + SetUTF8Flag($marc_record); $encoding = $charset_guessed unless $encoding; diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 9dc8b6e..252f05e 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -273,6 +273,7 @@ warn "query ".$query if $DEBUG; my ($charset_result, $charset_errors); ($marcrecord, $charset_result, $charset_errors) = MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]); + SetUTF8Flag($marcrecord); ####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc ## In HEAD i change everything to UTF-8 # In rel2_2 i am not sure what encoding is so no character conversion is done here diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index a44b5ea..18b0ff2 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -241,6 +241,7 @@ warn "query ".$query if $DEBUG; my ($charset_result, $charset_errors); ($marcrecord, $charset_result, $charset_errors) = MarcToUTF8Record($marcdata, C4::Context->preference('marcflavour'), $encoding[$k]); + SetUTF8Flag($marcrecord); ####WARNING records coming from Z3950 clients are in various character sets MARC8,UTF8,UNIMARC etc ## In HEAD i change everything to UTF-8 # In rel2_2 i am not sure what encoding is so no character conversion is done here -- 1.7.7.6