Bug Fixing : C4::Charset source_encoding always set to iso-8859-1
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 8 Oct 2009 09:44:31 +0000 (11:44 +0200)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 14 Oct 2009 16:19:09 +0000 (18:19 +0200)
C4/Charset.pm

index bffd374..655d6c7 100644 (file)
@@ -139,7 +139,6 @@ sub MarcToUTF8Record {
     my $marc = shift;
     my $marc_flavour = shift;
     my $source_encoding = shift;
-
     my $marc_record;
     my $marc_blob_is_utf8 = 0;
     if (ref($marc) eq 'MARC::Record') {
@@ -216,7 +215,7 @@ sub MarcToUTF8Record {
             @errors = _marc_iso5426_to_utf8($marc_record, $marc_flavour);
         } else {
             # assume any other character encoding is for Text::Iconv
-            @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, 'iso-8859-1');
+            @errors = _marc_to_utf8_via_text_iconv($marc_record, $marc_flavour, $source_encoding);
         }
 
         if (@errors) {