IDN with Gemini?

Glad to hear that you realize how it's more complex than you originally
thought.

> > -   Resolving relative IRIs would require parsing the current IRI,
> >     and the provided one, and combining them. You cannot just copy it
> >     to make the request.
> >
>
> Also true, but it should be the same value that is extracted for DNS.

No. I'm referring to things like this:

=> /docs/
=> example.gmi
=> dir/test/foo.gmi
=> //gus.guru/

These are all relative in some way, and they must be resolved in reference
to the IRI (or for Gemini right now, the URI) of the current page. This is not
the same as the domain that was extracted for DNS, and requires a full
parser.

> From what you said on irc, the situation is different between URI and IRI
> because most languages have URI parsing either in their stdlib or in a well
> tested known library. But, if no project use IRI, of course no one will
> write a library for it, this is a chicken and egg situation here.

Yep, it's a shame. But we must live with it, and so URIs are the way forward.

> Also, for the purpose of a client, it seems to me the parsing needed
> (domain and query extraction) is only to search for the first "/" and the last
> "?", and some minor tweaks on the scheme maybe (which does not contain unicode,
> I will leave the scheme alone, promise).

It's always more complex than that. I'm a bit too tired to go dig into the RFCs
to prove it right now, but I would not trust software that just matches some
characters instead of compliantly parsing things in their entirety. This method
would make Gemini more complex and easily introduce bugs. If we use URIs, we don't
have to resort to this.

> Note: Just tried gemini://gemini.circumlunar.space/%64%6f%63%73/%66%61%71%2e%67%6d%69
> in lagrange, it does work.

Works in Amfora too, and note that also the server software (Molly Brown) is accepting
and parsing it correctly into a file path. But that's expected, because it's
perfectly valid to percent-encode ASCII in a URL path.

Cheers,
makeworld

---

Previous in thread (50 of 68): 🗣️ Côme Chilliet (come (a) chilliet.eu)

Next in thread (52 of 68): 🗣️ Sean Conner (sean (a) conman.org)

View entire thread.