all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to write a compute-file producing utf8 output?
@ 2024-05-23 16:17 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
  0 siblings, 2 replies; 4+ messages in thread
From: Tomas Volf @ 2024-05-23 16:17 UTC (permalink / raw)
  To: guix-devel

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

Hello Guix,

I am currently struggling when trying to create a computed-file producing
internationalized content.  Simple reproducer is:

      (use-modules (gnu packages base)
                   (guix gexp))

      (computed-file
       "utf8-display"
       #~(with-output-to-file #$output
           (λ ()
             (display "猫\n"))))

This, when executed and printed, gives following result:

      /tmp $ guix build -e '(load "/tmp/yy.scm")'
      /gnu/store/fyr9h82v9hhbjm4f7lqsdnhs4c45sn3y-utf8-display
      /tmp $ cat /gnu/store/fyr9h82v9hhbjm4f7lqsdnhs4c45sn3y-utf8-display
      ?

As you can see, ? does not equal 猫.  I would expect the root cause to be the
same as #66777.

Any ideas what can I do about this?  Or, even better, why this does not just
work out of the box?

Thanks for your help,
Tomas

--
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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-01 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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.