RSS Feed validation: IRI found where URL expected - How to convert IRI link to the valid URL?

StackOverflow https://stackoverflow.com/questions/3155801

  •  01-10-2019
  •  | 
  •  

Question

I have created an RSS feed, that contains non-ASCII characters URLs (IRI). That's why it does not validate using Feed validator.

How important is that validation? As far as I know this is more or less a validation for legacy RSS readers?

Anyway, I would like to know how to convert IRI to URL in C#?

http://www.viva.si/Zdrav-način-prehrane/204/Jagodičje

to

http://www.viva.si/Zdrav-na%C4%8Din-prehrane/204/Jagodi%C4%8Dje
Was it helpful?

Solution

Solution:

string url = new Uri(iri).AbsoluteUri
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top