FAQ  •  Register  •  Login

RSS in UTF-8 format fails parsing.

<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Feb 04, 2012 9:50 pm

RSS in UTF-8 format fails parsing.

All my created RSS to date have been ANSI encoded with this heading and they work fine:
<?xml version="1.0" encoding="UTF-8" ?>
Today I created an RSS containing Chinese characters and saved it in UTF-8 encoding but when added to Serviio the log shows parsing fails:
2012-02-04 16:12:25,120 DEBUG [OnlineLibraryManager] Resource https://sites.google.com/site/serviiors ... tional.rss not in cache yet, loading it
2012-02-04 16:12:25,120 DEBUG [FeedParser] Parsing feed 'https://sites.google.com/site/serviiorss/LiveFeeds_China_National.rss'
2012-02-04 16:12:26,244 DEBUG [FeedParser] Unexpected error during url extractor plugin matching (LiveFeeds): Content is not allowed in prolog.
2012-02-04 16:12:26,245 DEBUG [FeedParser] Skipping feed item '综合频道 CCTV-1 General Channel' because it's not of type VIDEO
2


Java throws this exception if there are characters before the <?xml and sure enough, utf-8 files have a leading EF BB BF hex signature.

How do I get Serviio to accept an RSS with unicode characters(Chinese)?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sat Feb 04, 2012 11:14 pm

Re: RSS in UTF-8 format fails parsing.

this looks more like a bug in the plugin (I recall you're parsing the feed again in the matches() method). Looks like Serviio actually parses it but cannot invoke the matches() method.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Feb 05, 2012 6:05 am

Re: RSS in UTF-8 format fails parsing.

You are right on! Stripped the leading stuff of the Get before parsing and it works fine. Looks to me like any one parsing an RSS in UTF-8 would have to do this. I guess you are already doing it yourself in the default RSS handler.

Strange thing though... a number of the Chinese characters just show as boxes on the TV even thought they display correctly on the PC.
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Feb 05, 2012 11:23 am

Re: RSS in UTF-8 format fails parsing.

Utf8 is normally ok. It might be the BOM of the feed.
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Feb 05, 2012 2:17 pm

Re: RSS in UTF-8 format fails parsing.

I guess it depends on how the RSS is generated. If I create one with "Notepad" and save in any Unicode format, the file will have a BOM header.
<<

ylee

Serviio newbie

Posts: 1

Joined: Mon Feb 06, 2012 1:57 pm

Post Mon Feb 06, 2012 2:01 pm

Re: RSS in UTF-8 format fails parsing.

hi, i'm new to the forums. but i'm having exactly the same trouble getting a stream in an rss to work.

I've build my own rss feed and hosted it locally (just copied an working item out of the jhb50 list, like Espn America)
I'll get an

  Code:
2012-02-06 14:56:18,519 DEBUG [FeedParser] Parsing feed 'http://localhost/rss/tv_germany.rss'
2012-02-06 14:56:18,523 DEBUG [FeedParser] Skipping feed item 'ESPN America HD' because it's not of type VIDEO


i've tried different ways to save the file, but won't work. any clues?

/EDIT:
sorry my fault, seems like i didn't see that the rss feed filename has a special naming convention?
works now.

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 14 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.