Data Decoding Error with some .rss sites
Closed this issue · 6 comments
Hi, first a big thanks for making SyndiKit.
Unfortunately some websites and its feeds I've tested can't be decoded.
Here is an example, a german gaming website feed: https://www.gamestar.de/news/rss/news.rss
When I try to decode the data from it, a error is thrown: "The data couldn’t be read because it isn’t in the correct format."
Hi unfortunately i can't solve it. The decoder error occurs only on this website. I really don't know why. But because its the only one now, i think that this isn't a big problem.
Do you have an idea why this is happening, because in Germany it is a really popular site. And i wanted to know why the decoder can't work with this .rss ending site.
No I haven't had a chance to look yet. You should be to debug it pretty easily if you wish. I can give you a few points if interested. Otherwise I'd like to keep this open until we know why and whether it's a bug.
I found the issue. The URLs are improperly encoded since they have accented characters. URLs are only allowed to be ASCII characters.
Here you can see the failure:
https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fwww.gamestar.de%2Fnews%2Frss%2Fnews.rss
I can workaround this by percent-encoding the characters myself:
https://forums.swift.org/t/how-to-include-accented-characters-in-swift-url-without-percent-encoding/39215/2
I'll keep you in the loop.
Hi,
Big thank you,
that you found and want to fix this. I had trouble to find the issue.