IDN with Gemini?

On Tue, 8 Dec 2020 11:29:24 +0100
Stephane Bortzmeyer <stephane at sources.org> wrote:

> For Python (a common programming language), this is not true, standard
> library's urlparse has no problem:

Similar results in Go:


--- code
package main

import (
	"fmt"
	"net/url"
	"os"
)

func main() {
	for _, arg := range os.Args[1:] {
		u, err := url.Parse(arg)
		if err != nil {
			panic(err)
		}
		fmt.Printf("%q %q %q\n", u.Hostname(), u.Path, u.Query)
	}
}
---

However, this still leaves the problem of punycoding and worse,
normalization, to some other piece of code. In Go, normalization is in
the text package. ToASCII/ToUnicode implementations are in 
golang.org/x/net/idna

Not sure if Python will normalize by default.

-- 
Philip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20201208/fc40
4c5c/attachment-0001.sig>

---

Previous in thread (59 of 68): 🗣️ Stephane Bortzmeyer (stephane (a) sources.org)

Next in thread (61 of 68): 🗣️ Gary Johnson (lambdatronic (a) disroot.org)

View entire thread.