[spec] IRIs, IDNs, and all that international jazz
cage
cage-dev at twistfold.it
Tue Dec 22 17:18:27 GMT 2020
On Tue, Dec 22, 2020 at 04:13:06PM +0100, Solderpunk wrote:
> Hi folks,
Hi!
[...]
> Feedback welcome, especially if I've overlooked anything, which is
> certainly possible. 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:
The language i written my client with is Common lisp
> 1. Parse and relativise [absolutize] URLs with non-ASCII characters (so, yes, okay,
> technically not URLs at all, you know what I mean) in paths and/or
> domains?
The language has no concept of URI; IRI or even URL in the standard library.
I am aware of two free/libre libraries but in my experience both have problems.
I ended writing my custom parser for URI and IRI, that probably is broken as well. ;-)
> 2. Transform back and forth between URIs and IRIs?
Before making a request I punycode the domain and percent-encode the
query and fragment (should also percent-encode the path?).
Anyway there is a third party free library to do percent-encoding and
decoding.
> 3. Do DNS lookups of IDNs without them being punycoded first? You can
> test this with räksmörgås.josefsson.org.
There is library in CL that do punycoding, i wrapped a C library
(libidn2) to do the same instead. I can resolve the domain above! :)
Bye!
C.
More information about the Gemini
mailing list