all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: How to write a compute-file producing utf8 output?
Date: Sat, 1 Jun 2024 15:47:29 +0200	[thread overview]
Message-ID: <ZlsmcX6Nsq8WOKdQ@ws> (raw)
In-Reply-To: <877cf8pys3.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-06-01 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23 16:17 How to write a compute-file producing utf8 output? Tomas Volf
2024-05-23 19:59 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2024-06-01 13:39 ` Ludovic Courtès
2024-06-01 13:47   ` Tomas Volf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZlsmcX6Nsq8WOKdQ@ws \
    --to=~@wolfsden.cz \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.