💾 Archived View for rawtext.club › ~sloum › geminilist › 002228.gmi captured on 2020-09-24 at 03:16:20. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
Alex Schroeder alex at gnu.org
Fri Jul 17 11:52:43 BST 2020
- - - - - - - - - - - - - - - - - - -
On Fri, 2020-07-17 at 13:51 +0430, Ben wrote:
It does seem a proper URI should best contain %C4%9D in place of ĝ,
but
the question is whether I should change it in the document? Does the
internal linking (in my case the link is local/relative) even count
as a
URI?
I think you should change it to %C4%9D; otherwise you're relying onclients to do it for you (which might work). But in the example yougive, the stuff after =
is a URL, just not an absolute one. It's arelative URL and the client is supposed to know how to combine it withthe URL of our current URL and to request this document if the userwants to follow the link. So if the current URL isgemini://example.org/foo/bar then following the link below will takethe user to gemini://example.org/foo/logarion/ta%C4%9Dikio.
=
logarion/taĝikio--lando-montara.gmi Taĝikio: Lando Montara
A good way to think about this would be spaces in file names. Assumethe filename is "taĝikio: lando montara.gmi". What would you write?This won't work:
=
logarion/taĝikio: lando montara.gmi Taĝikio: Lando Montara
If you escape the spaces, why not escape the rest that needs escaping?
=
logarion/taĝikio:%20lando%20montara.gmi Taĝikio: Lando Montara
That's how I reason about it. Or if you want to go all-in, RFC 3986 hasyou covered. The only characters that unambiguously never have toescaped, no matter where they appear, are the unreserved ones:
Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde.
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
https://tools.ietf.org/html/rfc3986#section-2.3
And to be clear, ALPHA means a-z and A-Z, nothing else.
CheersAlex