XMLTV / xmltv

Utilities to obtain, generate, and post-process TV listings data in XMLTV format
GNU General Public License v2.0
269 stars 93 forks source link

ISO-8859-1 encoded xml file need UTF-8 #136

Closed Oumpa31 closed 3 years ago

Oumpa31 commented 3 years ago

Thanks for taking the time to report an issue. Please take a moment to review our open/closed issues above, in case your issue has already been reported.

If you are reporting a new issue, please give your issue a descriptive title and fill out the blanks below, providing as much information as possible.

XMLTV Version?

xmltv-1.0.0-win32 windows download

XMLTV Component?

… not sure what this is

What happened?

… got an "ISO-8859-1" encoded xml file

What did you expect to happen?

… get an utf-8 encoded xml

Did you see any warnings/errors?

(Please paste any warnings/errors, if available) … nothing comes up

What steps are needed to reproduce this issue?

(Please provide the full commands you are running)

  1. xmltv.exe tv_grab_na_dd --configure
  2. xmltv.exe tv_grab_na_dd --days 2 --output tst.xml

Any other information?

(For example, is this a new or intermittent issue?) …

What other software are you using?

Operating System: … windows 10

Perl Version:

i keep getting <?xml version="1.0" encoding="ISO-8859-1"?> but i need it to be <?xml version="1.0" encoding="UTF-8"?> xteve wont read iso-8859 properly i get an error saying xml: encoding "iso-8859-1" declared but decoder.charsetreader is nil how do i force it to encode using UTF-8 tst2.zip

rmeden commented 3 years ago

The xmltv file generated by tv_grab_na_dd clearly says it is ISO-8859-1

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE tv SYSTEM `"xmltv.dtd">

If you need it in another encoding, I'm sure there are programs out there to convert text files from ISO-8869-1 to UTF-8.

A quick google search came up with iconv, which seems to have a windows command line version (I haven't tried it)

http://gnuwin32.sourceforge.net/packages/libiconv.htm

honir commented 3 years ago

You might be able to trick tv_cat into converting the file encoding for you:

xmltv.exe tv_cat --utf8 --output tst_utf8.xml tst.xml

(note: I haven't tried this)

Oumpa31 commented 3 years ago

@honir that worked like a charm. Thank you

rmeden commented 3 years ago

"You had the power all along my dear" Glinda, the Good Witch of the North :)