[mythtvnz] XMLTV headers changed

Stephen Worthington stephen_agent at jsw.gen.nz
Sat Jul 7 10:22:44 BST 2012


On Sat, 7 Jul 2012 19:25:53 +1200, you wrote:

>Greetings
>
>It seems that the data contained in http://nzepg.org/freeview.xml.gz had a
>change of header last weekend.
>
>I followed the conversation about mhegsnoop having a header change but
>didn't realise it would propagate to the online data.
>
>This is a real problem for me as I merge data from epgsnoop with the
>online stuff (which has more detail for FreeView) using 'tv_cat' from the
>xmltv package and it barfs with:
>"/tmp/listings-freeview-31681.xml: this file's encoding utf-8 differs from
>others' ISO-8859-1 - aborting"
>
>So the online data now has utf-8 in the header but the epgsnoop data is
>ISO-8859-1. I tried changing outputter.py (in epgsnoop) to utf-8 but the
>data from satellite EPG has some interesting 8 bit characters (which I
>assume really are ISO-8859-1 codes).
>
>So who is right - utf-8 or ISO-8859-1 and how can I merge the two
>different encodings if they are both right!!
>
>Cheers

UTF-8 is the default for xmltv files, so I think the best thing would
be to find a way to convert the epgsnoop data to UTF-8.  I am sure
Python can do it somehow.  iconv can do the raw encoding conversion,
but does not understand xml and does not fix the headers.  So maybe a
change to the epgsnoop code would be best, to get it to output in
UTF-8.



More information about the mythtvnz mailing list