A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079217.html below:

[Python-Dev] urllib unicode handling

[Python-Dev] urllib unicode handling [Python-Dev] urllib unicode handlingRobert Brewer fumanchu at aminus.org
Wed May 7 17:55:34 CEST 2008
"Martin v. Löwis" wrote:
> The proper way to implement this would be IRIs (RFC 3987),
> in particular section 3.1. This is not as simple as just
> encoding it as UTF-8, as you might have to apply IDNA to
> the host part.
> 
> Code doing so just hasn't been contributed yet.

But if someone wanted to do so, it's pretty simple:

>>> u'www.\u212bngstr\xf6m.com'.encode("idna")
'www.xn--ngstrm-hua5l.com'


Robert Brewer
fumanchu at aminus.org

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4