diff --git a/generator/utils.ml b/generator/utils.ml index 6bc039f50..b3b7ee379 100644 --- a/generator/utils.ml +++ b/generator/utils.ml @@ -309,6 +309,7 @@ let pod2text ?width ?(trim = true) ?(discard = true) name longdesc = try Hashtbl.find pod2text_memo key with Not_found -> let filename, chan = Filename.open_temp_file "gen" ".tmp" in + fprintf chan "=encoding utf8\n\n"; fprintf chan "=head1 %s\n\n%s\n" name longdesc; close_out chan; let cmd = diff --git a/podwrapper.pl.in b/podwrapper.pl.in index cb6e9b270..bbc0b7cfa 100755 --- a/podwrapper.pl.in +++ b/podwrapper.pl.in @@ -515,6 +515,7 @@ if ($text) { $parser->output_string (\$output); $parser->parse_string_document ($content); open OUT, ">$text" or die "$progname: $text: $!"; + binmode OUT, ":utf8"; print OUT $output or die "$progname: $text: $!"; close OUT or die "$progname: $text: $!"; print "$progname: wrote $text\n";