(bug #4020) XSLT unimarc display
authorPaul Poulain <paul.poulain@biblibre.com>
Thu, 31 Dec 2009 08:07:54 +0000 (09:07 +0100)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Thu, 28 Jan 2010 14:11:51 +0000 (15:11 +0100)
commit9d1e7f43e15b869afc3fccd80c1545170cc84ea0
treef13c0890e0203502752481f65a2d67d85f540506
parenta97d12faa7e75a35382a9aa606907d61ef8575c9
(bug #4020) XSLT unimarc display

When using XSLT Display, and UNIMARC,
since marcFlavour is not used in encoding data, when data is true utf8, as_xml
fails on some subfields.

Moreover, because transformMARCXMLForXSLT edits some values in the marc record
and the PERL UTF8 is not handled by MARC::File::USMARC, it endsup in double
encoding the data.
Sending a patch to fix both issues.

This patch adds
    - two functions in  C4/Charset.pm
        NormalizeString (uses Unicode::Normalize)
        SetUTF8Flag (This function in my opinion belongs to MARC::Record, or at least MARC::File::USMARC)
    - edits C4::XSLT in order to cope with the correct marcflavour
    - edits C4::Search searchResults to use setUTF8Flag
C4/Charset.pm
C4/Search.pm
C4/XSLT.pm