faup icon indicating copy to clipboard operation
faup copied to clipboard

No support for IDN ?

Open sonicold opened this issue 5 years ago • 1 comments

I would like to get the UTF-8 version of the URL, but I m not sure if Faup is supposed to support IDN:

 wget météo.fr
--2020-03-04 11:00:19--  http://xn--mto-bmab.fr/
Resolving météo.fr (xn--mto-bmab.fr)... 51.91.131.126
Connecting to météo.fr (xn--mto-bmab.fr)|51.91.131.126|:80... connected.

From python

>>> f = Faup()
>>> f.decode('www.xn--mto-bmab.fr')
>>> f.get()
{'tld': b'fr', 'fragment': None, 'port': None, 'domain_without_tld': b'xn--mto-bmab', 'scheme': None, 'query_string': None, 'subdomain': b'www', 'url': b'www.xn--mto-bmab.fr', 'resource_path': None, 'domain': b'xn--mto-bmab.fr', 'host': b'www.xn--mto-bmab.fr'}

Shouldn t it be météo.fr ?

sonicold avatar Mar 04 '20 10:03 sonicold

Well, I have not put thoughts on it, and it is true we could translate in that situation. It should at least be an option in the engine. In the meantime we should be able to do something with the lua plugins. Let me see the best way I can do this.

Thanks! This is exactly how I can make the project better with this kind of bug report!

stricaud avatar Mar 04 '20 16:03 stricaud