From dcebae55ddf8828a4b3b4ac5edd145c1dd216665 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Thu, 27 Mar 2008 09:21:02 +0100 Subject: [PATCH] Bug Fixing : Editing items was broken when using diacritics. Encoding was wrong Signed-off-by: Joshua Ferraro --- C4/Items.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index eccc5aef69..05caf8856e 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -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) { -- 2.39.5