mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
pod: Fix "wide character in print" warnings by declaring encoding correctly.
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user