diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-11 23:42:03 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-11 23:42:03 +0000 |
commit | 9c2ece3d968e08b7cf28c43ace68684cae2ba8c4 (patch) | |
tree | 750fccfd3c951d6e58a6d2ac26f8f5ee6d6af4bd /make-authors-short.pl | |
parent | 0f66112c84cf8108b27a98a38912e48f794d7b30 (diff) |
From Graeme Hewson: translate accented UTF-8 characters to Pod E<>
escapes so they turn into *roff escapes and HTML entities in the output,
in case raw UTF-8 doesn't work.
svn path=/trunk/; revision=11975
Diffstat (limited to 'make-authors-short.pl')
-rwxr-xr-x | make-authors-short.pl | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/make-authors-short.pl b/make-authors-short.pl index 8c8559fafc..caa8b5bc90 100755 --- a/make-authors-short.pl +++ b/make-authors-short.pl @@ -2,36 +2,17 @@ # $Id$ -# Remove tasks from individual author entries from AUTHORS file -# for use in the about dialog. - use strict; -my $subinfo=0; -my $nextline; - -print "=for html <pre>\n\n"; -print "=for man .nf\n\n"; +# Unset environment variables so perl doesn't +# interpret bytes as UTF-8 characters -$_ = <>; -s/\xef\xbb\xbf//; # Skip UTF-8 byte order mark -print unless /^\n/; +delete $ENV{LANG}; +delete $ENV{LANGUAGE}; +delete $ENV{LC_ALL}; +delete $ENV{LC_CTYPE}; -while (<>) { - if (/(.*){/) { - $subinfo = 1; - print "$1\n"; - } elsif (/}/) { - $subinfo = 0; - if (($nextline = <>) !~ /^[\s]*$/) { - print $nextline; - } - } elsif ($subinfo == 1) { - next; - } else { - print; - } -} +# Call make-authors-short2.pl in same directory, using same interpreter -print "\n=for html </pre>\n"; -print "\n=for man .fi\n"; +(my $prog2 = $0) =~ s/\.pl$/2.pl/; +system($^X, "$prog2", @ARGV); |