https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16488
Franck Theeten <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |franck.theeten@africamuseum | |.be --- Comment #24 from Franck Theeten <[email protected]> --- Dear list, We had also the issue of not being able to decipher the accented UTF-8 characters of the SRU server of the BNF in Koha, and maybe found a solution by doing a slight modification in the XSLT file of MARCEDIT (see comment 3 of Theodoros Theodoropoulos). The leader field of a MARC XML document must declare the encoding in its 9th bit (10th character). It has to be “a” for UTF-8 documents, and blank for non_UTF-8. https://knowledge.exlibrisgroup.com/Voyager/Knowledge_Articles/Determine_the_character_set_of_a_MARC_record But the XSLT file leaves it always blank. I had to modify a line in the XSLT (see below) that generates the bits 8 to 16 in the leader. Maybe I could send the updated file to a GIT repository available to the community ? Best regards, Franck ------------ Original file: <xsl:template name="transform-leader"> <xsl:variable name="leader" select="marc:leader"/> <xsl:variable name="leader05" select="translate(substring($leader,06,1), 'o', 'c')"/> <xsl:variable name="leader06" select="translate(substring($leader,07,1), 'hmn', 'aor')"/> <xsl:variable name="leader07" select="substring($leader,08,1)"/> <xsl:variable name="leader08-16" select="' 22 '"/> <xsl:variable name="leader17" select="translate(substring($leader,18,1), '23', '87')"/> <xsl:variable name="leader18" select="translate(substring($leader,19,1), ' n', 'i ')"/> <xsl:variable name="leader19-23" select="' 4500'"/> ------------ Same snippet with correction : -------------- <xsl:template name="transform-leader"> <xsl:variable name="leader" select="marc:leader"/> <xsl:variable name="leader05" select="translate(substring($leader,06,1), 'o', 'c')"/> <xsl:variable name="leader06" select="translate(substring($leader,07,1), 'hmn', 'aor')"/> <xsl:variable name="leader07" select="substring($leader,08,1)"/> <xsl:variable name="leader08-16" select="' a22 '"/> <xsl:variable name="leader17" select="translate(substring($leader,18,1), '23', '87')"/> <xsl:variable name="leader18" select="translate(substring($leader,19,1), ' n', 'i ')"/> <xsl:variable name="leader19-23" select="' 4500'"/> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
