guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to write a compute-file producing utf8 output?


From: Tomas Volf
Subject: Re: How to write a compute-file producing utf8 output?
Date: Sat, 1 Jun 2024 15:47:29 +0200

On 2024-06-01 15:39:56 +0200, Ludovic Courtès wrote:
> Tomas Volf <~@wolfsden.cz> skribis:
>
> > I am currently struggling when trying to create a computed-file producing
> > internationalized content.  Simple reproducer is:
>
> I think you found out in the meantime :-), but for posterity, one
> possibility is to set ‘%default-port-encoding’:
>
>   (fluid-set! %default-port-encoding "UTF-8")

Thanks for the information :)

While this approach works (even the set-port-encoding! does), the problem with
this approach is that this needs to be put into every computed-file, making it
easy to forget (especially with #$random-variable, where you might not even know
if Unicode is present or not).  And is not possible at all with likes of
program-file.

So I still hope someone manages to take a look at
https://issues.guix.gnu.org/71257 which should just fix it for everyone across
majority of the G-exp forms.

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]