Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No support for IDN ? #107

Open
sonicold opened this issue Mar 4, 2020 · 1 comment
Open

No support for IDN ? #107

sonicold opened this issue Mar 4, 2020 · 1 comment

Comments

@sonicold
Copy link

sonicold commented Mar 4, 2020

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 ?

@stricaud
Copy link
Owner

stricaud commented Mar 4, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants