Description: Removes dependency on Unicode::UTF8simple and replace it with Encode
Forwarded: not-needed
Author: Nick Morrott <knowledgejunkie@gmail.com>
Last-Update: 2015-06-20

Index: xmltv-rebuild/grab/pt/tv_grab_pt
===================================================================
--- xmltv-rebuild.orig/grab/pt/tv_grab_pt	2015-06-30 16:01:09.119692492 +0100
+++ xmltv-rebuild/grab/pt/tv_grab_pt	2015-06-30 16:01:09.119692492 +0100
@@ -367,18 +367,6 @@
 	*d = \&Log::TraceMessages::d;
 	Log::TraceMessages::check_argv();
     }
-
-    # Use Encode module if available  
-    eval { require Encode; }; 
-    if ($@) { 
-        require Unicode::UTF8simple; 
-        my $uref = new Unicode::UTF8simple; 
-     
-        *toUTF8 = sub { return fix_utf8( $uref->toUTF8(@_) ); } 
-    } else { 
-        #   *toUTF8 = sub { my $str = $_[1]; Encode::from_to($str, $_[0], "utf-8"); return $str; } 
-        *toUTF8 = sub { return fix_utf8( Encode::encode("utf-8", $_[0]) ); } 
-    }
 }
 
 # Clean up bad characters in HTML.
@@ -401,6 +389,11 @@
     return $_[0];
 }
 
+# Wrapper around Encode (and fix_utf8)
+sub toUTF8( $ )  {
+    return fix_utf8( Encode::encode("utf-8", $_[0]) );
+}
+
 # UTF-8 fixups.
 sub fix_utf8( $ ) {
     #  The details page claims to be utf-8 but there are some invalid characters in the incoming data
