Fix file handling (UTF8 mode).
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
be39a05f1c
commit
6e68ad79f5
2 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue