diff --git a/ChangeLog b/ChangeLog index 3d35539..46cc602 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ yapfaq 1.0.0 (unreleased) * Complete rewrite. * Add POD. +* Fix file handling (UTF8 mode). yapfaq 0.10 (unreleased) * Add: Charset definition. diff --git a/bin/yapfaq.pl b/bin/yapfaq.pl index 242e8e4..ed8f94d 100755 --- a/bin/yapfaq.pl +++ b/bin/yapfaq.pl @@ -372,7 +372,7 @@ sub BuildPosting { my($LastPosted, $LastMID); if (-r $StatusFile) { print "- Reading status ($Project.cfg).\n" if $Config{'debug'}; - my @Status = path($StatusFile)->lines_utf8; + my @Status = path($StatusFile)->lines; foreach (@Status) { # convert Windows line-endings to Unix s/\r//; @@ -389,8 +389,8 @@ sub BuildPosting { } print "- Reading headers ($Project.hdr) and body ($Project.txt).\n" if $Config{'debug'}; - my @Headers = path($HeaderFile)->lines_utf8; - my @Body = path($BodyFile)->lines_utf8; + my @Headers = path($HeaderFile)->lines; + my @Body = path($BodyFile)->lines; my %Header = &ParseHeaders(@Headers); # check for mandatory headers @@ -562,7 +562,7 @@ sub UpdateStatus { push @Status, "Last-Message-ID: $LastMID\n"; $StatusFile = path($StatusFile); - $StatusFile->spew_utf8(@Status); + $StatusFile->spew(@Status); print "- Status updated.\n" if $Config{'debug'}; return;