diff options
author | Brendan O'Dea <bod@debian.org> | 2022-02-15 11:12:43 +1100 |
---|---|---|
committer | Brendan O'Dea <bod@debian.org> | 2022-02-15 11:12:43 +1100 |
commit | 665a493ca051bcb882359df315984d2c771be528 (patch) | |
tree | c9f5789ab1f45b8fbfcb02724011d240b1be7efa /help2man.PL | |
parent | caa322a78aff2901adcb3eb511a60863291f2ec1 (diff) | |
download | help2man-665a493ca051bcb882359df315984d2c771be528.tar.gz |
Defer encoding of variables in .TH and encode the whole header
Diffstat (limited to 'help2man.PL')
-rwxr-xr-x | help2man.PL | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/help2man.PL b/help2man.PL index 8463a9f..b0bfbad 100755 --- a/help2man.PL +++ b/help2man.PL @@ -417,7 +417,7 @@ if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/) # the English version expands to the month as a word and the full year. It # is used on the footer of the generated manual pages. If in doubt, you may # just use %x as the value (which should be the full locale-specific date). -my $date = enc strftime _("%B %Y"), localtime $epoch_secs; +my $date = strftime _("%B %Y"), localtime $epoch_secs; my $program = program_basename $ARGV[0]; my $package = $program; my $version; @@ -498,9 +498,9 @@ unless ($manual) { for ($section) { - if (/^(1[Mm]|8)/) { $manual = enc _('System Administration Utilities') } - elsif (/^6/) { $manual = enc _('Games') } - else { $manual = enc _('User Commands') } + if (/^(1[Mm]|8)/) { $manual = _('System Administration Utilities') } + elsif (/^6/) { $manual = _('Games') } + else { $manual = _('User Commands') } } } @@ -821,7 +821,7 @@ while (my ($sect, $text) = each %replace) } # Output header. -print <<EOT; +print enc <<EOT; .\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version. .TH $PROGRAM "$section" "$date" "$source" "$manual" EOT |