From 4434389d5703224e2136238727e00f5648a85c69 Mon Sep 17 00:00:00 2001 From: tipaul Date: Wed, 1 Oct 2003 13:25:49 +0000 Subject: [PATCH] seems a char encoding problem modified something in char_decode sub... changing back to something that works... --- C4/Biblio.pm | 231 ++++++++++++++++++++++++++------------------------- 1 file changed, 117 insertions(+), 114 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index efb4b5f4d2..69a83bc1c7 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1,6 +1,9 @@ package C4::Biblio; # $Id$ # $Log$ +# Revision 1.63 2003/10/01 13:25:49 tipaul +# seems a char encoding problem modified something in char_decode sub... changing back to something that works... +# # Revision 1.62 2003/09/17 14:21:13 tipaul # fixing bug that makes a MARC biblio disappear when using full acquisition (order => recieve ==> MARC editor). # Before this 2 lines fix, the MARC biblio was deleted during recieve, and had to be entirely recreated :-( @@ -683,7 +686,7 @@ sub MARCgetbiblio { my ($dbh,$bibid)=@_; my $record = MARC::Record->new(); #---- TODO : the leader is missing - $record->leader(' '); + $record->leader(' '); my $sth=$dbh->prepare("select bibid,subfieldid,tag,tagorder,tag_indicator,subfieldcode,subfieldorder,subfieldvalue,valuebloblink from marc_subfield_table where bibid=? order by tag,tagorder,subfieldcode @@ -2298,122 +2301,122 @@ sub char_decode { $_ = $string ; # $encoding = C4::Context->preference("marcflavour") unless $encoding; if ($encoding eq "UNIMARC") { - s/\xe1/€/gm ; - s/\xe2/€/gm ; - s/\xe9/€/gm ; - s/\xec/€/gm ; - s/\xf1/€/gm ; - s/\xf3/€/gm ; - s/\xf9/€/gm ; - s/\xfb/€/gm ; - s/\xc1\x61/€/gm ; - s/\xc1\x65/€/gm ; - s/\xc1\x69/€/gm ; - s/\xc1\x6f/€/gm ; - s/\xc1\x75/€/gm ; - s/\xc1\x41/€/gm ; - s/\xc1\x45/€/gm ; - s/\xc1\x49/€/gm ; - s/\xc1\x4f/€/gm ; - s/\xc1\x55/€/gm ; - s/\xc2\x41/€/gm ; - s/\xc2\x45/€/gm ; - s/\xc2\x49/€/gm ; - s/\xc2\x4f/€/gm ; - s/\xc2\x55/€/gm ; - s/\xc2\x59/€/gm ; - s/\xc2\x61/€/gm ; - s/\xc2\x65/€/gm ; - s/\xc2\x69/€/gm ; - s/\xc2\x6f/€/gm ; - s/\xc2\x75/€/gm ; - s/\xc2\x79/€/gm ; - s/\xc3\x41/€/gm ; - s/\xc3\x45/€/gm ; - s/\xc3\x49/€/gm ; - s/\xc3\x4f/€/gm ; - s/\xc3\x55/€/gm ; - s/\xc3\x61/€/gm ; - s/\xc3\x65/€/gm ; - s/\xc3\x69/€/gm ; - s/\xc3\x6f/€/gm ; - s/\xc3\x75/€/gm ; - s/\xc4\x41/€/gm ; - s/\xc4\x4e/€/gm ; - s/\xc4\x4f/€/gm ; - s/\xc4\x61/€/gm ; - s/\xc4\x6e/€/gm ; - s/\xc4\x6f/€/gm ; - s/\xc8\x45/€/gm ; - s/\xc8\x49/€/gm ; - s/\xc8\x65/€/gm ; - s/\xc8\x69/€/gm ; - s/\xc8\x76/€/gm ; - s/\xc9\x41/€/gm ; - s/\xc9\x4f/€/gm ; - s/\xc9\x55/€/gm ; - s/\xc9\x61/€/gm ; - s/\xc9\x6f/€/gm ; - s/\xc9\x75/€/gm ; - s/\xca\x41/€/gm ; - s/\xca\x61/€/gm ; - s/\xd0\x43/€/gm ; - s/\xd0\x63/€/gm ; + s/\xe1/Æ/gm ; + s/\xe2/Ð/gm ; + s/\xe9/Ø/gm ; + s/\xec/þ/gm ; + s/\xf1/æ/gm ; + s/\xf3/ð/gm ; + s/\xf9/ø/gm ; + s/\xfb/ß/gm ; + s/\xc1\x61/à/gm ; + s/\xc1\x65/è/gm ; + s/\xc1\x69/ì/gm ; + s/\xc1\x6f/ò/gm ; + s/\xc1\x75/ù/gm ; + s/\xc1\x41/À/gm ; + s/\xc1\x45/È/gm ; + s/\xc1\x49/Ì/gm ; + s/\xc1\x4f/Ò/gm ; + s/\xc1\x55/Ù/gm ; + s/\xc2\x41/Á/gm ; + s/\xc2\x45/É/gm ; + s/\xc2\x49/Í/gm ; + s/\xc2\x4f/Ó/gm ; + s/\xc2\x55/Ú/gm ; + s/\xc2\x59/Ý/gm ; + s/\xc2\x61/á/gm ; + s/\xc2\x65/é/gm ; + s/\xc2\x69/í/gm ; + s/\xc2\x6f/ó/gm ; + s/\xc2\x75/ú/gm ; + s/\xc2\x79/ý/gm ; + s/\xc3\x41/Â/gm ; + s/\xc3\x45/Ê/gm ; + s/\xc3\x49/Î/gm ; + s/\xc3\x4f/Ô/gm ; + s/\xc3\x55/Û/gm ; + s/\xc3\x61/â/gm ; + s/\xc3\x65/ê/gm ; + s/\xc3\x69/î/gm ; + s/\xc3\x6f/ô/gm ; + s/\xc3\x75/û/gm ; + s/\xc4\x41/Ã/gm ; + s/\xc4\x4e/Ñ/gm ; + s/\xc4\x4f/Õ/gm ; + s/\xc4\x61/ã/gm ; + s/\xc4\x6e/ñ/gm ; + s/\xc4\x6f/õ/gm ; + s/\xc8\x45/Ë/gm ; + s/\xc8\x49/Ï/gm ; + s/\xc8\x65/ë/gm ; + s/\xc8\x69/ï/gm ; + s/\xc8\x76/ÿ/gm ; + s/\xc9\x41/Ä/gm ; + s/\xc9\x4f/Ö/gm ; + s/\xc9\x55/Ü/gm ; + s/\xc9\x61/ä/gm ; + s/\xc9\x6f/ö/gm ; + s/\xc9\x75/ü/gm ; + s/\xca\x41/Å/gm ; + s/\xca\x61/å/gm ; + s/\xd0\x43/Ç/gm ; + s/\xd0\x63/ç/gm ; # this handles non-sorting blocks (if implementation requires this) $string = nsb_clean($_) ; - } elsif ($encoding eq "USMARC") { + } elsif ($encoding eq "USMARC" || $encoding eq "MARC21") { if(/[\xc1-\xff]/) { - s/\xe1\x61/€/gm ; - s/\xe1\x65/€/gm ; - s/\xe1\x69/€/gm ; - s/\xe1\x6f/€/gm ; - s/\xe1\x75/€/gm ; - s/\xe1\x41/€/gm ; - s/\xe1\x45/€/gm ; - s/\xe1\x49/€/gm ; - s/\xe1\x4f/€/gm ; - s/\xe1\x55/€/gm ; - s/\xe2\x41/€/gm ; - s/\xe2\x45/€/gm ; - s/\xe2\x49/€/gm ; - s/\xe2\x4f/€/gm ; - s/\xe2\x55/€/gm ; - s/\xe2\x59/€/gm ; - s/\xe2\x61/€/gm ; - s/\xe2\x65/€/gm ; - s/\xe2\x69/€/gm ; - s/\xe2\x6f/€/gm ; - s/\xe2\x75/€/gm ; - s/\xe2\x79/€/gm ; - s/\xe3\x41/€/gm ; - s/\xe3\x45/€/gm ; - s/\xe3\x49/€/gm ; - s/\xe3\x4f/€/gm ; - s/\xe3\x55/€/gm ; - s/\xe3\x61/€/gm ; - s/\xe3\x65/€/gm ; - s/\xe3\x69/€/gm ; - s/\xe3\x6f/€/gm ; - s/\xe3\x75/€/gm ; - s/\xe4\x41/€/gm ; - s/\xe4\x4e/€/gm ; - s/\xe4\x4f/€/gm ; - s/\xe4\x61/€/gm ; - s/\xe4\x6e/€/gm ; - s/\xe4\x6f/€/gm ; - s/\xe8\x45/€/gm ; - s/\xe8\x49/€/gm ; - s/\xe8\x65/€/gm ; - s/\xe8\x69/€/gm ; - s/\xe8\x76/€/gm ; - s/\xe9\x41/€/gm ; - s/\xe9\x4f/€/gm ; - s/\xe9\x55/€/gm ; - s/\xe9\x61/€/gm ; - s/\xe9\x6f/€/gm ; - s/\xe9\x75/€/gm ; - s/\xea\x41/€/gm ; - s/\xea\x61/€/gm ; + s/\xe1\x61/à/gm ; + s/\xe1\x65/è/gm ; + s/\xe1\x69/ì/gm ; + s/\xe1\x6f/ò/gm ; + s/\xe1\x75/ù/gm ; + s/\xe1\x41/À/gm ; + s/\xe1\x45/È/gm ; + s/\xe1\x49/Ì/gm ; + s/\xe1\x4f/Ò/gm ; + s/\xe1\x55/Ù/gm ; + s/\xe2\x41/Á/gm ; + s/\xe2\x45/É/gm ; + s/\xe2\x49/Í/gm ; + s/\xe2\x4f/Ó/gm ; + s/\xe2\x55/Ú/gm ; + s/\xe2\x59/Ý/gm ; + s/\xe2\x61/á/gm ; + s/\xe2\x65/é/gm ; + s/\xe2\x69/í/gm ; + s/\xe2\x6f/ó/gm ; + s/\xe2\x75/ú/gm ; + s/\xe2\x79/ý/gm ; + s/\xe3\x41/Â/gm ; + s/\xe3\x45/Ê/gm ; + s/\xe3\x49/Î/gm ; + s/\xe3\x4f/Ô/gm ; + s/\xe3\x55/Û/gm ; + s/\xe3\x61/â/gm ; + s/\xe3\x65/ê/gm ; + s/\xe3\x69/î/gm ; + s/\xe3\x6f/ô/gm ; + s/\xe3\x75/û/gm ; + s/\xe4\x41/Ã/gm ; + s/\xe4\x4e/Ñ/gm ; + s/\xe4\x4f/Õ/gm ; + s/\xe4\x61/ã/gm ; + s/\xe4\x6e/ñ/gm ; + s/\xe4\x6f/õ/gm ; + s/\xe8\x45/Ë/gm ; + s/\xe8\x49/Ï/gm ; + s/\xe8\x65/ë/gm ; + s/\xe8\x69/ï/gm ; + s/\xe8\x76/ÿ/gm ; + s/\xe9\x41/Ä/gm ; + s/\xe9\x4f/Ö/gm ; + s/\xe9\x55/Ü/gm ; + s/\xe9\x61/ä/gm ; + s/\xe9\x6f/ö/gm ; + s/\xe9\x75/ü/gm ; + s/\xea\x41/Å/gm ; + s/\xea\x61/å/gm ; # this handles non-sorting blocks (if implementation requires this) $string = nsb_clean($_) ; } -- 2.39.5