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 <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfeac64865)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2019-04-07 16:25:28 +00:00 committed by Martin Renvoize
parent 07b8478a19
commit ad2a3c5e80
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 7 additions and 0 deletions

View File

@ -144,6 +144,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(