Subject: Re: bug#55912: [PATCH] home: Add OpenSSH service.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 16 Jun 2022 18:18:50 +0200

Maxime Devos <[email-masked]> skribis:

> I did a quick test, and apparently Guile calls nl_langinfo to determine
> the encoding, which returns ANSI_X3.4-1968, because glibc defaults to
> the C locale.  So unless you want to change the encoding of the C
> locale or change the default locale or override glibc's choice of
> default locale in Guile, I don't think there's anything to change in
> Guile?

Glibc 2.35 includes the “C.UTF-8” locale; I don’t know if it’s the
default, but it will likely help.

> Somewhat related, I could look into separating locales from the file
> name encoding in Guile (with a parameter object or something) later? 
> Not a solution as-is, but would be convenient in many places ...

Yes, that too.  In (guix build syscalls), there’s a variant of ‘scandir’
for instance that is locale-independent and decodes file names as UTF-8.
Nowadays that’s probably the most sensible option.

In Guile proper, it would be nice if there were a ‘%file-name-encoding’
fluid.

Thanks,
Ludo’.