xmltv/grab/pt tv_grab_pt,1.55,1.56
Nick Morrott <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/pt
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26080/grab/pt
Modified Files:
tv_grab_pt
Log Message:
tv_grab_pt: Remove dependency on Unicode::UTF8simple, which can cause headaches for packagers. Encode has been available in core Perl since 5.8.8
Index: tv_grab_pt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/pt/tv_grab_pt,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** tv_grab_pt 13 Apr 2015 15:41:16 -0000 1.55
--- tv_grab_pt 13 Apr 2015 16:10:48 -0000 1.56
***************
*** 367,382 ****
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]) ); }
- }
}
--- 367,370 ----
***************
*** 401,404 ****
--- 389,397 ----
}
+ # Wrapper around Encode (and fix_utf8)
+ sub toUTF8( $ ) {
+ return fix_utf8( Encode::encode("utf-8", $_[0]) );
+ }
+
# UTF-8 fixups.
sub fix_utf8( $ ) {
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF