prof18/RSS-Parser

String encoding

Closed this issue · 7 comments

2021-05-31 (2)
The resulting strings are encoded. This should not be the case. Look at the title.

Hi,
can you share the link to the feed, so I can check it out?

Any feedback?

Sorry for the delay, I'm gonna look into it in the next few days!

I've written a test case that covers the issue you reported and it's working. Unfortunately, the item of the feed you reported is not available anymore and I have used a similar one (the title is Where the Grass is Greener, Except When It’s ‘Nonfunctional Turf’ wich is similar to ‘On That Edge of Fear’: One Woman’s Struggle With Sickle Cell Pain that you have reported)

Let me know if is working for you or if you still have the past feed so I can test it out with it.

Thank you.

I found out that I had set the Charset in the Parser object to ISO-8859-7:

val parser = Parser.Builder()
                .context(this)
                .charset(Charset.forName("ISO-8859-7"))
                .cacheExpirationMillis(24L * 60L * 60L * 100L) // one day
                .build()

But the feed was in UTF-8

I changed the charset for the Parser object to the default UTF-8 and it worked! Thank you for the help and the tests!

Perfect! I'm glad you solved the issue.