Unicode vs. the World
colecmac at protonmail.com
colecmac at protonmail.com
Wed Dec 16 23:57:15 GMT 2020
> It would be instructive to know how clients are handling this---do they
> decode percent-encoded data, merge the base link to the relative link and
> re-encode? Or something different?
>
> -spc
My clients (gemget, Amfora) are in Go, so I just `Parse` both the base link
and the relative link, and then use `base.ResolveReference(rel)`. This means
I don't have to do any decoding or anything at all.
URL.Path and URL.RawPath can be used to get the decoded and encoded path
respectively, although I have no need in this context.
https://golang.org/pkg/net/url/#URL
https://golang.org/pkg/net/url/#Parse
https://golang.org/pkg/net/url/#URL.ResolveReference
makeworld
More information about the Gemini
mailing list