Skip to content

Commit

Permalink
Bug 22075: Fix encoding problem with RIS export in OPAC
Browse files Browse the repository at this point in the history
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 <[email protected]>

Signed-off-by: Nick Clemens <[email protected]>
  • Loading branch information
kfischer authored and kidclamp committed Apr 11, 2019
1 parent 3c2ce5d commit bfeac64
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions opac/opac-export.pl
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@
-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(
Expand Down

0 comments on commit bfeac64

Please sign in to comment.