[spec] IRIs, IDNs, and all that international jazz
Stephane Bortzmeyer
stephane at sources.org
Tue Dec 22 19:37:08 GMT 2020
On Tue, Dec 22, 2020 at 04:13:06PM +0100,
Solderpunk <solderpunk at posteo.net> wrote
a message of 278 lines which said:
> What I'd be most interested in hearing, at this point, is client
> authors letting me know whether the standard library in the language
> their client is implemented in can straightforwardly:
Tests with Python. All of this is now implemented in the Agunua tool
<https://framagit.org/bortzmeyer/agunua>.
% agunua gemini://gémeaux.bortzmeyer.org/café.gmi
# Du café
Si vous voyez cela, c'est que votre client Gemini gère les IRI.
> 1. Parse and relativise URLs with non-ASCII characters (so, yes, okay,
> technically not URLs at all, you know what I mean) in paths and/or
> domains?
No problem, standard library urllib.parse.urlparse parses IRI.
> 2. Transform back and forth between URIs and IRIs?
Not directly in the standard library, but the code is simple (attached).
> 3. Do DNS lookups of IDNs without them being punycoded first? You can
> test this with räksmörgås.josefsson.org.
Yes, punycoding is handled by the standard library
socket.getaddrinfo. (May be a violation of RFC 6055 but I did not
search further.)
There is also this third-party package which I did not test
<https://pypi.org/project/rfc3987/>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: convert-iri-uri.py
Type: text/x-python
Size: 1143 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201222/77f2451d/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: convert-uri-iri.py
Type: text/x-python
Size: 659 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201222/77f2451d/attachment-0001.py>
More information about the Gemini
mailing list