diff --git a/UVreadmail.pm b/UVreadmail.pm index 1ac4865..0a1f98f 100644 --- a/UVreadmail.pm +++ b/UVreadmail.pm @@ -3,12 +3,9 @@ package UVreadmail; -use utf8; -use open qw(:std :encoding(UTF-8)); use strict; use UVconfig; use UVmessage; -use Encode qw(decode :fallbacks); use MIME::QuotedPrint; use MIME::Base64; use MIME::Parser; @@ -203,7 +200,6 @@ sub process { # extract address and name my $from = $head->get('From') || ''; - utf8::decode($from); # fix double encoding if ($from =~ /\s*([^<]\S+\@\S+[^>]) \((.+)\)/) { ($voter_addr, $voter_name) = ($1, $2); @@ -244,13 +240,6 @@ sub process { $body = $entity->stringify_body; } - # body: charset conversion to Perl internal representation - my $ct = $head->get('Content-Type') || ''; - if ($ct =~ /^text\/plain;.*charset=\"?([-a-zA-Z0-9]+)\"?/i) { - my $charset = $1; - $body = decode($charset, $body, FB_CROAK); - } - my $h_date = $head->get('Date') || ''; chomp $h_date; diff --git a/UVsendmail.pm b/UVsendmail.pm index e306a21..a773733 100644 --- a/UVsendmail.pm +++ b/UVsendmail.pm @@ -3,8 +3,6 @@ package UVsendmail; -use utf8; -use open qw(:std :utf8); use strict; use UVconfig; use UVtemplate; @@ -241,7 +239,7 @@ sub mimeencode { $word =~ s/\n//g; my $encword; if ($word =~ /[\x7F-\xFF]/) { - $encword = MIME::Words::encode_mimeword($word, 'Q', 'UTF-8'); + $encword = MIME::Words::encode_mimeword($word, 'Q', 'ISO-8859-1'); } elsif (length($word) > 75) { $encword = MIME::Words::encode_mimeword($word, 'Q', 'us-ascii'); } else { diff --git a/UVtemplate.pm b/UVtemplate.pm index c592987..35f28db 100644 --- a/UVtemplate.pm +++ b/UVtemplate.pm @@ -44,8 +44,6 @@ einer Liste immer 60 Zeichen lang ist um ansehnliche Tabellen auszugeben. #---------------------------------------------------------------------- -use utf8; -use open qw(:std :utf8); use strict; use vars qw( $VERSION $functions @dirs); use UVconfig; @@ -372,10 +370,10 @@ sub _parse_rules{ sub _strip_chars{ my $line = $_[0] || return; - # führenden whitespace entfernen + # führenden whitespace entfernen $$line =~ s/^\s+//; - # kommentare bis zum nächsten Zeilenumbruch entfernen + # kommentare bis zum nächsten Zeilenumbruch entfernen $$line =~ s/^#.*$//m; } @@ -620,8 +618,8 @@ sub _parse_comment{ my $count = 1; while($string && $count) { - $string =~ s/^[^\[\]\\]+//s; # alles außer Klammern und Backslash wegwerfen - $string =~ s/^\\.//; # alles gesperrte löschen + $string =~ s/^[^\[\]\\]+//s; # alles außer Klammern und Backslash wegwerfen + $string =~ s/^\\.//; # alles gesperrte löschen $count++ if $string =~ s/^\[//; $count-- if $string =~ s/^\]//; @@ -777,7 +775,7 @@ Sonderzeichen oder Leerzeichen uebergeben werden muessen diese gequotet werden. Dazu kann ' also auch " verwendet werden. Die Funktionen geben im Allgemeinen einen String zurueck. Im Rahmen -von Listen können auch Arrays uebergeben werden. +von Listen können auch Arrays uebergeben werden. Die erste Funktion duerfte ueblicherweise 'value' sein. Sie gibt den des angegeben Schluessel zurueck, der dann von den folgenden Funktionen diff --git a/templates/address-not-registered b/templates/address-not-registered index 05736fb..f12ae79 100644 --- a/templates/address-not-registered +++ b/templates/address-not-registered @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 head := value head | quote "> " body := value body | quote "> " diff --git a/templates/ballot-personal b/templates/ballot-personal index c64230c..495baec 100644 --- a/templates/ballot-personal +++ b/templates/ballot-personal @@ -10,7 +10,7 @@ bdsginfo := value bdsginfo | create-lines 72 bdsgtext-first := value bdsgtext | first-words 50 bdsgtext-more := value bdsgtext | drop-words 50 | create-lines 50 -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 == TEMPLATE ================================================================= diff --git a/templates/bdsg-error b/templates/bdsg-error index 236728a..bd44741 100644 --- a/templates/bdsg-error +++ b/templates/bdsg-error @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 == TEMPLATE ================================================================= Zur Wertung deiner Stimme ist die Zustimmung zur Speicherung, diff --git a/templates/cancelled b/templates/cancelled index cb28607..07cb9b2 100644 --- a/templates/cancelled +++ b/templates/cancelled @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 == TEMPLATE ================================================================= Diese automatische Nachricht wurde dir nach Erhalt Deiner ANNULLIERUNG diff --git a/templates/invalid-account b/templates/invalid-account index ac1fe1e..909dc01 100644 --- a/templates/invalid-account +++ b/templates/invalid-account @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 head := value head | quote "> " body := value body | quote "> " diff --git a/templates/invalid-name b/templates/invalid-name index db3320b..ce7a28d 100644 --- a/templates/invalid-name +++ b/templates/invalid-name @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 head := value head | quote "> " body := value body | quote "> " diff --git a/templates/mailheader b/templates/mailheader index 684abbc..93746ba 100644 --- a/templates/mailheader +++ b/templates/mailheader @@ -12,5 +12,5 @@ Message-ID: [$msgid] Date: [$date] X-Automated-Message: generated by [$usevote-version] MIME-Version: 1.0 -Content-Type: text/plain; charset\=UTF-8 +Content-Type: text/plain; charset\=iso-8859-1 Content-Transfer-Encoding: 8bit diff --git a/templates/multiple-votes b/templates/multiple-votes index ba9ba9e..d56b3ec 100644 --- a/templates/multiple-votes +++ b/templates/multiple-votes @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 body := value body | quote "> " == TEMPLATE ================================================================= diff --git a/templates/no-ballot b/templates/no-ballot index f6f737c..4a2b71e 100644 --- a/templates/no-ballot +++ b/templates/no-ballot @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 body := value body | quote "> " == TEMPLATE ================================================================= diff --git a/templates/no-ballotid b/templates/no-ballotid index c13d283..2628944 100644 --- a/templates/no-ballotid +++ b/templates/no-ballotid @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 head := value head | quote "> " body := value body | quote "> " diff --git a/templates/no-votes b/templates/no-votes index f24d86d..1a6de00 100644 --- a/templates/no-votes +++ b/templates/no-votes @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 body := value body | quote "> " == TEMPLATE ================================================================= diff --git a/templates/rule-violated b/templates/rule-violated index 095079c..ef95b33 100644 --- a/templates/rule-violated +++ b/templates/rule-violated @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 body := value body | quote "> " == TEMPLATE ================================================================= diff --git a/templates/wrong-ballotid b/templates/wrong-ballotid index f8a41d0..0eb49f7 100644 --- a/templates/wrong-ballotid +++ b/templates/wrong-ballotid @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 head := value head | quote "> " body := value body | quote "> " diff --git a/templates/wrong-voting b/templates/wrong-voting index 7d1c6e8..f233b7d 100644 --- a/templates/wrong-voting +++ b/templates/wrong-voting @@ -1,4 +1,4 @@ -votetaker := value mailfrom +votetaker := value mailfrom | fill-left 65 body := value body | quote "> " == TEMPLATE ================================================================= diff --git a/uvbounce.pl b/uvbounce.pl index 44dfc1a..0a7352f 100755 --- a/uvbounce.pl +++ b/uvbounce.pl @@ -21,8 +21,6 @@ # written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ############################################################################### -use utf8; -use open qw(:std :utf8); use strict; use Getopt::Long; use FindBin qw($Bin); diff --git a/uvcfv.pl b/uvcfv.pl index ee12b54..5f09080 100755 --- a/uvcfv.pl +++ b/uvcfv.pl @@ -20,8 +20,6 @@ # written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ############################################################################### -use utf8; -use open qw(:std :utf8); use strict; use Getopt::Long; use Digest::MD5 qw(md5_hex); diff --git a/uvcount.pl b/uvcount.pl index 0e14c3e..4af9a8f 100755 --- a/uvcount.pl +++ b/uvcount.pl @@ -20,8 +20,6 @@ # written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ############################################################################### -use utf8; -use open qw(:std :encoding(UTF-8)); use strict; use Getopt::Long; use Digest::MD5 qw(md5_hex); diff --git a/uvvote.pl b/uvvote.pl index c629b20..7f23a42 100755 --- a/uvvote.pl +++ b/uvvote.pl @@ -21,8 +21,6 @@ # written in C). Not all functions of Usevote/UseVoteGer 3.x are implemented! ############################################################################### -use utf8; -use open qw(:std :utf8); use strict; use Getopt::Long; use Text::Wrap qw(wrap $columns); @@ -332,7 +330,6 @@ sub process_vote { $voter_name = $3; $voter_name =~ s/^\s+//; # strip leading spaces $voter_name =~ s/\s+$//; # strip trailing spaces - utf8::decode($voter_name); # fix double encoding } if ($voter_name) {