xmltv/grab/nl tv_grab_nl,1.76,1.77
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/nl
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23756
Modified Files:
tv_grab_nl
Log Message:
(minor) fix badiso8859 warning
Index: tv_grab_nl
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/nl/tv_grab_nl,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** tv_grab_nl 29 Apr 2014 18:25:17 -0000 1.76
--- tv_grab_nl 30 Apr 2014 18:28:23 -0000 1.77
***************
*** 412,424 ****
# subroutine definitions
! my $warned_bad_chars;
sub tidy( $ ) {
! for (my $tmp = shift) {
! tr/\221\222/''/;
! if (tr/\012\015\040-\176\240-\377//dc) {
! warn 'removing bad characters' unless $warned_bad_chars++;
! }
! return $_;
! }
}
--- 412,432 ----
# subroutine definitions
! #my $warned_bad_chars;
! #sub tidy( $ ) {
! # for (my $tmp = shift) {
! # tr/\221\222/''/;
! # if (tr/\012\015\040-\176\240-\377//dc) {
! # warn 'removing bad characters' unless $warned_bad_chars++;
! # }
! # return $_;
! # }
! #}
!
! # Remove bad chars
sub tidy( $ ) {
! $_[0] =~ s/(\s) /$1/og; # replace 'space- ' with 'space'
! $_[0] =~ s/ / /og; # replace any remaining with space
! $_[0] =~ s/­//og; # delete soft hyphens
! return $_[0];
}
***************
*** 507,511 ****
};
! print STDERR "Fetching ",$url," ...\n" if not $opt_quiet;
my $t = get_nice_json($url, '', 1);
--- 515,519 ----
};
! #print STDERR "Fetching ",$url," ...\n" if not $opt_quiet;
my $t = get_nice_json($url, '', 1);
***************
*** 680,684 ****
#
# page is "charset=iso-8859-1"
! $t = get_nice_tree($url);
if ($@) {
warn "error getting/parsing $url: $@";
--- 688,692 ----
#
# page is "charset=iso-8859-1"
! $t = get_nice_tree($url, \&tidy);
if ($@) {
warn "error getting/parsing $url: $@";
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos. Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs