[Koha-cvs] koha/C4 Koha.pm [rel_3_0]

paul poulain paul at koha-fr.org
Fri Feb 9 10:11:32 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	paul poulain <tipaul>	07/02/09 09:11:32

Modified files:
	C4             : Koha.pm 

Log message:
	char_decode now does MARC8 => utf8, so no need to to from_to a second time.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&only_with_tag=rel_3_0&r1=1.40.2.34&r2=1.40.2.35

Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.40.2.34
retrieving revision 1.40.2.35
diff -u -b -r1.40.2.34 -r1.40.2.35
--- Koha.pm	9 Jan 2007 17:21:20 -0000	1.40.2.34
+++ Koha.pm	9 Feb 2007 09:11:31 -0000	1.40.2.35
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: Koha.pm,v 1.40.2.34 2007/01/09 17:21:20 toins Exp $
+# $Id: Koha.pm,v 1.40.2.35 2007/02/09 09:11:31 tipaul Exp $
 
 use strict;
 require Exporter;
@@ -25,7 +25,7 @@
 use C4::Output;
 use vars qw($VERSION @ISA @EXPORT);
 
-$VERSION = do { my @v = '$Revision: 1.40.2.34 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.40.2.35 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -1534,10 +1534,10 @@
                 substr($subfield->[1],26,2,"0103") if ($targetcharset eq "latin1");
                 substr($subfield->[1],26,4,"5050") if ($targetcharset eq "utf8");
                 }
-                map {C4::Biblio::char_decode($_,"UNIMARC");Encode::from_to($_,$decoder->name,$targetcharset);$_=~tr#\r##} @$subfield;
+                map {C4::Biblio::char_decode($_,"UNIMARC")} @$subfield;
                 $newField->add_subfields($subfield->[0]=>$subfield->[1]);
             } else {
-                map {C4::Biblio::char_decode($_,"UNIMARC");Encode::from_to($_,$decoder->name,$targetcharset);$_=~tr#\r##} @$subfield;
+                map {C4::Biblio::char_decode($_,"UNIMARC")} @$subfield;
                 $newField=MARC::Field->new($field->tag(),$field->indicator(1),$field->indicator(2),$subfield->[0]=>$subfield->[1]);
                 $createdfield=1;
             }





More information about the Koha-cvs mailing list