Bug Fixing : Editing items was broken when using diacritics.
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Thu, 27 Mar 2008 08:21:02 +0000 (09:21 +0100)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 7 Apr 2008 20:53:08 +0000 (15:53 -0500)
Encoding was wrong

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Items.pm

index eccc5ae..05caf88 100644 (file)
@@ -1994,6 +1994,7 @@ sub _get_unlinked_subfields_xml {
         # use of tag 999 is arbitrary, and doesn't need to match the item tag
         # used in the framework
         $marc->append_fields(MARC::Field->new('999', ' ', ' ', @$unlinked_item_subfields));
+        $marc->encoding("UTF-8");    
         $xml = $marc->as_xml();
     }
 
@@ -2014,7 +2015,7 @@ sub  _parse_unlinked_item_subfields_from_xml {
     my $xml = shift;
 
     return unless defined $xml and $xml ne "";
-    my $marc = MARC::Record->new_from_xml(StripNonXmlChars($xml), 'UTF-8', C4::Context->preference("marcflavour"));
+    my $marc = MARC::Record->new_from_xml(StripNonXmlChars($xml),'UTF-8');
     my $unlinked_subfields = [];
     my @fields = $marc->fields();
     if ($#fields > -1) {