diff --git a/lib/ManUtils/ManUtils.pm b/lib/ManUtils/ManUtils.pm index 8b157ca..84f573b 100644 --- a/lib/ManUtils/ManUtils.pm +++ b/lib/ManUtils/ManUtils.pm @@ -24,13 +24,6 @@ sub fmt { $$output = ''; @$errors = (); - $input = - # Disable hyphenation, since that screws up man page references. :-( - ".hy 0\n.de hy\n..\n" - # Emulate man-db's --nj option - .".na\n.de ad\n..\n" - .$input; - $input = encode_utf8($input); # Call grog to figure out which preprocessors to use. @@ -70,6 +63,13 @@ sub fmt { # grog 1.22.3 somehow loses the -P-c argument, let's make sure it's in the list. splice @cmd, 1, 0, '-P-c'; + $input = + # Disable hyphenation, since that screws up man page references. :-( + ".hy 0\n.de hy\n..\n" + # Emulate man-db's --nj option + .".na\n.de ad\n..\n" + .$input; + my $groff = run_cmd \@cmd, '<' => \$input, '>' => \my $fmt,