prof18/RSS-Parser

Issue with accented characters

morcejo opened this issue · 3 comments

Hi @prof18 !!

Thanks so much, for sharing this useful library. I'm just started to use it in my app and I have found one problem. The RSS that I'm using (https://www.kitmaker.net/rss/rss_0.xml) includes some accented characters like in this title:

Armorama : Dnepromodel: Big Scale Zrínyi II

When showing this text in the app, those characters appear like a diamond with a question mark. Do you know how to solve this issue? I have tried some parsing after retrieving the contents but I had no luck with it so far.

Best regards
Juan

I gave a look to CoreXMLParser.kt and you are using:

xmlPullParser.setInput(StringReader(xml))

Looks like the RSS that I'm accessing is not defining the encoding in the XML so the parser can't identify the correct encoding. Maybe it's a good idea to add an optional "encoding" member to Parse class to then make the call like this:

xmlPullParser.setInput(StringReader(xml),encoding)

What do you think?

Best regards
Juan

Thanks for sharing, it's definitely an improvement to do.

Fixed with release 2.0.5