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
  •  | 
  •  

Pergunta

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
Foi útil?

Solução

Solution:

string url = new Uri(iri).AbsoluteUri
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top