--- tv_grab_eu_epgdata.in.orig 2007-12-04 19:54:22.079104882 +0100 +++ tv_grab_eu_epgdata.in.mod 2007-12-04 19:57:38.649081908 +0100 @@ -516,7 +516,16 @@ my $xmltv_channel_list = "\n"; - my $writer = new XMLTV::Writer(); + # duplicate some code (again) + my %w_args; + if (defined $opt->{output}) { + my $fh = new IO::File(">$opt->{output}"); + die "ERROR: cannot write to $opt->{output}: $!" if not defined $fh; + $w_args{OUTPUT} = $fh; + } + $w_args{encoding} = 'ISO-8859-1'; + + our $writer = new XMLTV::Writer(%w_args); # there should be a global variable for these attributes $writer->start({ 'generator-info-name' => '@@name' });