X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=805c216455e3372e89721af8610c6b1597b313f0;hp=b5b59b753eb59ce4da707e62a897b5667ddadb18;hb=HEAD;hpb=6e49580a28012f07aeeb1a9ad8f9ce9b789ce8f9 diff --git a/yapfaq.pl b/yapfaq.pl index b5b59b7..d4114d4 100755 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -7,7 +7,7 @@ # will use it in combination with cron(8). # # Copyright (C) 2003 Marc Brockschmidt -# Copyright (c) 2010-2017 Thomas Hochstein +# Copyright (c) 2010-2017 Thomas Hochstein # # It can be redistributed and/or modified under the same terms under # which Perl itself is published. @@ -45,7 +45,7 @@ my %Options; getopts('Vhvpdt:f:c:s:', \%Options); # -V: print version / copyright information if ($Options{'V'}) { - print "$0 v $VERSION\nCopyright (c) 2003 Marc Brockschmidt \nCopyright (c) 2010-2017 Thomas Hochstein \n"; + print "$0 v $VERSION\nCopyright (c) 2003 Marc Brockschmidt \nCopyright (c) 2010-2017 Thomas Hochstein \n"; print "This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.\n"; exit(0); } @@ -196,10 +196,6 @@ sub readconfig{ warn "$0: W: The Message-ID format for your project \"$$Config[$i]{'name'}\" seems to be invalid - set to default.\n"; $$Config[$i]{'mid-format'} = '<%n-%y-%m-%d@'.hostfqdn.'>'; # set default if mid-format is invalid } - unless(defined($$Config[$i]{'charset'})) { - warn "$0: W: Your project \"$$Config[$i]{'name'}\" has no encoding defined - set to default (UTF-8).\n"; - $$Config[$i]{'charset'} = 'UTF-8'; - } } $Error .= "-" x 25 . 'program terminated' . "-" x 25 . "\n" if $Error; die $Error if $Error; @@ -300,7 +296,8 @@ sub postfaq { } # Set Charset - my $ContentType = sprintf('text/plain; charset=%s',$Charset); + $$Charset = 'UTF-8' if !$$Charset; + my $ContentType = sprintf('text/plain; charset=%s',$$Charset); # Test mode? if($Options{'t'} and $Options{'t'} !~ /console/i) { @@ -865,7 +862,7 @@ L. =head1 AUTHOR -Thomas Hochstein +Thomas Hochstein Original author (up to version 0.5b, dating from 2003): Marc Brockschmidt @@ -874,7 +871,7 @@ Marc Brockschmidt Copyright (c) 2003 Marc Brockschmidt -Copyright (c) 2010-2017 Thomas Hochstein +Copyright (c) 2010-2017 Thomas Hochstein This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.