Subject: bug#35785: ‘string->uri’ is locale-dependent and breaks in ‘sv_SE’

From: Ludovic Courtès <[email-masked]>
Date: Tue, 28 May 2019 13:17:15 +0200

Hi Timothy,

Timothy Sample <[email-masked]> skribis:

> A quick reading of RFC 3986 suggests that the host part of a URI can be
> an IP address (version 4 or 6) or a registered name.  It gives the
> following rules for registered names:
>
> reg-name      = *( unreserved / pct-encoded / sub-delims )
> unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
> pct-encoded   = "%" HEXDIG HEXDIG
> sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
>               / "*" / "+" / "," / ";" / "="
>
> Here, “ALPHA”, “DIGIT”, and “HEXDIG” are specified in RFC 2234, and are
> just the ASCII ranges you might expect (except for that “HEXDIG” only
> allows uppercase letters).

Do you think you could turn that into a patch for Guile?  I’d happily
apply it.  :-)

It looks like both [[:alnum:]] & co. and ranges would be
locale-dependent, so my understanding is that we’ll have to list all the
characters explicitly, right?

Thanks,
Ludo’.