This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def asciify_url(url, force_quote=False): | |
r""" | |
SOURCE: https://blog.elsdoerfer.name/2008/12/12/opening-iris-in-python/ | |
Attempts to make a unicode url usuable with ``urllib/urllib2``. | |
More specifically, it attempts to convert the unicode object ``url``, | |
which is meant to represent a IRI, to an unicode object that, | |
containing only ASCII characters, is a valid URI. This involves: |
OlderNewer