xmltv/grab/fi/fi common.pm,2.05,2.06

Stefan Becker <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/fi/fi
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13779/grab/fi/fi

Modified Files:
	common.pm 
Log Message:
- common: switch default to strict UTF-8 encoding


Index: common.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fi/fi/common.pm,v
retrieving revision 2.05
retrieving revision 2.06
diff -C2 -d -r2.05 -r2.06
*** common.pm	22 Feb 2015 14:10:47 -0000	2.05
--- common.pm	24 Feb 2015 18:41:32 -0000	2.06
***************
*** 49,53 ****
      if (($debug) = @_) {
        # Debug messages may contain Unicode
!       binmode(STDERR, ":utf8");
        debug(1, "Debug level set to $debug.");
      }
--- 49,53 ----
      if (($debug) = @_) {
        # Debug messages may contain Unicode
!       binmode(STDERR, ":encoding(utf-8)");
        debug(1, "Debug level set to $debug.");
      }
***************
*** 55,59 ****
  }
  
! # Fetch URL as UTF8 encoded string
  sub fetchRaw($;$$) {
    my($url, $encoding, $nofail) = @_;
--- 55,59 ----
  }
  
! # Fetch URL as UTF-8 encoded string
  sub fetchRaw($;$$) {
    my($url, $encoding, $nofail) = @_;
***************
*** 76,83 ****
        unless ($@) {
  	  # Everything is OK
! 	  # NOTE: "utf8"  means "Perl's historic notion of UTF-8"
! 	  #       "utf-8" means "utf-8-strict" which is NOT the same!
! 	  #       (see Encode man page)
! 	  $content = decode($encoding || "utf8", $content);
  	  last RETRY;
        } elsif (($@ =~ /error: 500 Timeout/) && $retries--) {
--- 76,81 ----
        unless ($@) {
  	  # Everything is OK
! 	  # NOTE: utf-8 means "strict UTF-8 standard encoding"
! 	  $content = decode($encoding || "utf-8", $content);
  	  last RETRY;
        } elsif (($@ =~ /error: 500 Timeout/) && $retries--) {


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.