IDN with Gemini?
colecmac at protonmail.com
colecmac at protonmail.com
Mon Dec 7 21:46:06 GMT 2020
On Monday, December 7, 2020 4:00 PM, Scot <gmi1 at scotdoyle.com> wrote:
> On 12/7/20 12:00 PM, colecmac at protonmail.com wrote:
>
> > What parsing would a client have to do?
> >
> > - Extracting the domain, so it can be punycoded for DNS lookups
>
> Can we be sure gemini host resolution will always use the global DNS?
>
> Section 4 of RFC 6055 cautions against assuming that all name resolution
> is using the global DNS and therefore that querying with punycode
> domain names will succeed:
>
> It is inappropriate for an application that calls a general-purpose
> name resolution library to convert a name to an A-label unless the
> application is absolutely certain that, in all environments where the
> application might be used, only the global DNS that uses IDNA
> A-labels actually will be used to resolve the name.
That's interesting, thanks for sharing. However, it seems obvious to me
that punycoding is a necessity, since the global DNS system won't work
without it. I've worked with offline mesh network systems, but never
had to handle Unicode domain names. However, all of our stack was software
that was intended to work on the Internet, as well as any other network.
Standard DNS servers, standard OS and stdlib DNS resolvers, etc. So
punycoding would be the right way to do it in that network too.
Despite what this RFC says, I don't see what situation would actually
completely fail on punycoded domains. I guess the spec could mandate trying
with punycode first, than Unicode, but that seems needless to me. Do you
have an example of a system/network that fails on punycode?
> Conversely, querying with utf8 domain names fails on Ubuntu 20.04
> using systemd-resolved [1].
Yep, that's what I meant when I called it a necessity.
> Some languages/libraries such as Python convert utf8 requests to
> punycode silently before submitting the request to the resolver [2].
That's pretty handy, but it doesn't change my advice. The spec can state
that all domains must by punycoded for DNS, and maybe your library
will handle that or not. Even if an unware Pythonista manually punycodes
the domain, nothing bad will happen when the library tries again.
Cheers,
makeworld
More information about the Gemini
mailing list