From: Felix Lechner via "Development of GNU Guix and the GNU System distribution." <guix-devel@gnu.org>
To: Tomas Volf <~@wolfsden.cz>, guix-devel@gnu.org
Subject: Re: How to write a compute-file producing utf8 output?
Date: Thu, 23 May 2024 12:59:18 -0700 [thread overview]
Message-ID: <87jzjks3jd.fsf@lease-up.com> (raw)
In-Reply-To: <Zk9sJPSeXhYsmuTE@ws>
Hi Tomas,
On Thu, May 23 2024, Tomas Volf wrote:
> As you can see, ? does not equal 猫.
Maybe it helps you that this file works:
(use-modules (gnu packages base)
(guix gexp))
(computed-file
"utf8-display"
#~(with-output-to-file #$output
(λ ()
(use-modules (ice-9 binary-ports)
(rnrs bytevectors))
(put-bytevector (current-output-port)
(string->utf8 "猫\n")))))
Diagnosing encoding issues can be tricky. Therefore:
$ guix shell xxd -- xxd /gnu/store/qqljfpzks62kph7qqdv26aj76r2q14nz-utf8-display
00000000: e78c ab0a
The present issue reminds me---and perhaps you---of
https://issues.guix.gnu.org/69381.
Kind regards
Felix
next prev parent reply other threads:[~2024-05-23 20:00 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. [this message]
2024-06-01 13:39 ` Ludovic Courtès
2024-06-01 13:47 ` Tomas Volf
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=87jzjks3jd.fsf@lease-up.com \
--to=guix-devel@gnu.org \
--cc=felix.lechner@lease-up.com \
--cc=~@wolfsden.cz \
/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.