Unicode vs. the World
Gary Johnson
lambdatronic at disroot.org
Fri Dec 18 23:38:55 GMT 2020
Petite Abeille <petite.abeille at gmail.com> writes:
> Perhaps of interest:
> xbib/net: Sane URL, URI, IRI implementations for Java
> https://github.com/xbib/net
Thanks for the link. I gave it a shot, but it appears to be buggy and
doesn't have any documentation. I ended up reading through the source
code on Github to figure out how to call its API, but sadly it looks
like it can't correctly identify the host part of the incoming string.
Instead, it thinks it is part of the path, which is obviously no good.
space-age.requests> (parse-url "gemini://🐇.mozz.us/%20🐇.gmi?some-key=🐇&🐇=some-value#🐇-fragment")
{:path "/🐇.mozz.us/ 🐇.gmi",
:raw-query "some-key=%F0%9F%90%87&%F0%9F%90%87=some-value",
:fragment "🐇-fragment",
:params ["some-key=🐇" "🐇=some-value"],
:port 1965,
:host "",
:raw-fragment "%F0%9F%90%87-fragment",
:uri
"gemini://🐇.mozz.us/%20🐇.gmi?some-key=🐇&🐇=some-value#🐇-fragment",
:query "some-key=🐇&🐇=some-value",
:raw-path "/%F0%9F%90%87.mozz.us/%20%F0%9F%90%87.gmi",
:raw-host "",
:scheme "gemini"}
Oh well, I guess I'll stick with java.net.URI for now.
Cheers,
Gary
--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the Gemini
mailing list