Marius Bakke <mba...@fastmail.com> skribis: > Marius Bakke <mba...@fastmail.com> writes: > >> Hello Guix, >> >> I'm trying to package the Norwegian Bokmål Aspell dictionary, which >> contains a 'bokmål.alias' in the source archive. This causes 'readdir' >> to throw a decoding-error. > > I'm sorry, the file name is actually ISO-8859-1 encoded. I've updated > the subject. From what I understand Guile should be able to handle > unicode file names just fine.
In Guile, file names are strings and not bytevectors like in C. So they have to be properly encoded. The convention that Guile follows is to decode file names according to its current locale encoding. By default, all our builds run in the en_US.utf8 locale. However, you can change that: ‘gnu-build-system’ supports a #:locale parameter, so you can do: #:locale "nb_NO.iso88591" > Are there any Latin1 locales available in the build environment, and > would setting it make any difference? No! So you’ll have to add a package containing that locale as an input to the build process though. To that end, I suggest that you abstract ‘glibc-utf8-locales’ in base.scm so you can then write: (define glibc-latin1-locales (make-glibc-locale-package "ISO-8859-1" '("nb_NO" "fr_FR"))) That’s more than you wanted to know I guess. Don’t expect to spell-check your Norwegian text for the time being. ;-) HTH! Ludo’.