From c14c725a5333e98fd4a4276c62047923d06f8c4f Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sun, 7 Apr 2019 16:25:28 +0000 Subject: [PATCH] Bug 22075: Fix encoding problem with RIS export in OPAC When exporting a record with diacritics in RIS format from the detail page in OPAC the encoding is not correct and the diacritics appear broken. This patch fixes it. To test: - Find or create a record with some special chars in your OPAC - Go to the detail page - Save as > RIS - Verify the diacritics are broken in an editor - Apply patch - Repeat and verify everything now displays correctly Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit bfeac6486516f185d9882d294d5000ab773c7dd5) Signed-off-by: Martin Renvoize (cherry picked from commit ad2a3c5e8034d82edda187aa113029eb4f07b4bb) Signed-off-by: Lucas Gass --- opac/opac-export.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/opac/opac-export.pl b/opac/opac-export.pl index 4ffe1d3b5d..4ad506940f 100755 --- a/opac/opac-export.pl +++ b/opac/opac-export.pl @@ -130,6 +130,13 @@ else { -charset => 'utf-8', -attachment => "bib-$biblionumber.txt" ); + } + elsif ( $format eq 'ris' ) { + print $query->header( + -type => 'text/plain', + -charset => 'utf-8', + -attachment => "bib-$biblionumber.$format" + ); } else { binmode STDOUT, ':encoding(UTF-8)'; print $query->header( -- 2.39.5