GNU bug report logs - #63608
UTF-8 support absent within guix shell --pure less

Previous Next

Package: guix;

Reported by: Bruno Victal <mirai <at> makinata.eu>

Date: Sat, 20 May 2023 14:18:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: bug-guix <bug-guix <at> gnu.org>
Cc: mirai <at> makinata.eu, Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: UTF-8 support absent within guix shell --pure less
Date: Sat, 20 May 2023 15:17:12 +0100
Within a ``guix shell --pure less'' environment, the “less” command
does not display UTF-8 characters properly:
--8<---------------cut here---------------start------------->8---
~/src/guix$ guix shell --pure less
~/src/guix [env]$ less gnu/packages/java-xml.scm
"gnu/packages/java-xml.scm" may be a binary file.  See it anyway?
--8<---------------cut here---------------end--------------->8---

Answering the prompt with 'y' will display:
--8<---------------cut here---------------start------------->8---
;;; GNU Guix --- Functional package management for GNU
;;; Copyright <C2><A9> 2017, 2021, 2023 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright <C2><A9> 2017, 2018, 2021 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright <C2><A9> 2018 G<C3><A1>bor Boskovits <boskovits <at> gmail.com>
;;; Copyright <C2><A9> 2019, 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright <C2><A9> 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
;;; Copyright <C2><A9> 2021 L<C3><A9>o Le Bouter <lle-bout <at> zaclys.net>
;;; Copyright <C2><A9> 2022 Christopher Baines <mail <at> cbaines.net>
;;;
;;; This file is part of GNU Guix.

…
--8<---------------cut here---------------end--------------->8---

This can be worked around by setting the LESSCHARSET environment variable:
--8<---------------cut here---------------start------------->8---
~/src/guix [env]$ LESSCHARSET=utf8 less gnu/packages/java-xml.scm
--8<---------------cut here---------------end--------------->8---

Which will correctly display (without any prompts):
--8<---------------cut here---------------start------------->8---
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017, 2021, 2023 Ricardo Wurmus <rekado <at> elephly.net>
;;; Copyright © 2017, 2018, 2021 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright © 2018 Gábor Boskovits <boskovits <at> gmail.com>
;;; Copyright © 2019, 2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
;;; Copyright © 2021 Léo Le Bouter <lle-bout <at> zaclys.net>
;;; Copyright © 2022 Christopher Baines <mail <at> cbaines.net>
;;;
;;; This file is part of GNU Guix.

…
--8<---------------cut here---------------end--------------->8---

This does not happen with a non-pure ``guix shell less'', it properly
shows UTF-8 characters without having to manually set any environment
variables.
Adding glibc-locales to ``guix shell --pure less glibc-locales''
does not help either and in neither environments is GUIX_LOCPATH set
as it was suggested at <https://logs.guix.gnu.org/guix/2023-05-20.log#035013>.




This bug report was last modified 1 year and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.