Skip to content

Commit

Permalink
Apply CRLF conversion on mutool show raw data
Browse files Browse the repository at this point in the history
This is so that the text is handled properly on Windows.
  • Loading branch information
zmughal committed Nov 3, 2017
1 parent 4591b96 commit a392ac4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Renard/Incunabula/MuPDF/mutool.pm
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ fun get_mutool_get_trailer_raw($pdf_filename) {
qw(trailer)
);

$trailer_text;
open my $trailer_fh, '<:encoding(UTF-8):crlf', \$trailer_text;
do { local $/ = ''; <$trailer_fh> };
}

=func get_mutool_get_object_raw
Expand All @@ -299,7 +300,8 @@ fun get_mutool_get_object_raw($pdf_filename, $object_id) {
$object_id,
);

$object_text;
open my $object_fh, '<:encoding(UTF-8):crlf', \$object_text;
do { local $/ = ''; <$object_fh> };
}

=func get_mutool_get_info_object_parsed
Expand Down

0 comments on commit a392ac4

Please sign in to comment.