From 2e9c00e1bdd19f3fb61ce0aaede85d5f5400ef81 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Sun, 10 Aug 2008 14:05:26 +0000 Subject: * AUTOTIMER: fix some orthography * EVENTS: store news from last month into database * RSS: dump news from database * TIMERS: event if timer adjusted * TIMERS/AUTOTIMER: rewrite event/news handling * xxvd: show pid at startup * xxvd: show base revision at startup * CHANNELS: fix detect radio channels * REPORT: Refactoring event handling, move any function to modul EVENTS. * EVENTS: elist function to list news as table * EVENTS: respect minimum level to exclude unwanted harmless news * RSS/MAIL... : remove dependency to modul REPORT --- lib/Tools.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/Tools.pm') diff --git a/lib/Tools.pm b/lib/Tools.pm index 682fdde..984314d 100644 --- a/lib/Tools.pm +++ b/lib/Tools.pm @@ -356,9 +356,9 @@ sub load_file { lg sprintf('Load file "%s" (%s)',$file, $binmode); my $mode = '<'; -# if($binmode ne 'binary') { -# $mode .= ':utf8' if($CHARSET && $CHARSET eq 'UTF-8'); -# } + #if($binmode ne 'binary') { + # $mode .= ':encoding(utf8)' if($CHARSET && $CHARSET eq 'UTF-8'); + #} my $fh = IO::File->new($file,$mode) or return error(sprintf("Couldn't open %s : %s!",$file,$!)); @@ -384,11 +384,12 @@ sub save_file { if($binmode ne 'binary') { $data =~ s/\r\n/\n/sig; -# $mode .= ':utf8' if($CHARSET && $CHARSET eq 'UTF-8'); + # $mode .= ':encoding(utf8)' if($CHARSET && $CHARSET eq 'UTF-8'); } my $fh = IO::File->new($file,$mode) - or return error(sprintf("Couldn't write %s : %s!",$file,$!)); + or return error(sprintf("Couldn't write %s : %s!",$file,$!)); + print $fh $data; $fh->close; -- cgit v1.2.3