Skip to content

No support for IDN ? #107

@sonicold

Description

@sonicold

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions