UTF-8 support absent within guix shell --pure less

  • Open
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Bruno Victal
Owner
unassigned
Submitted by
Bruno Victal
Severity
normal
B
B
Bruno Victal wrote on 20 May 2023 16:17
(name . bug-guix)(address . bug-guix@gnu.org)
64646e0d-75b4-3564-8dc8-b56e2cd7138a@makinata.eu
Within a ``guix shell --pure less'' environment, the “less” command
does not display UTF-8 characters properly:
Toggle snippet (5 lines)
~/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?

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


This can be worked around by setting the LESSCHARSET environment variable:
Toggle snippet (3 lines)
~/src/guix [env]$ LESSCHARSET=utf8 less gnu/packages/java-xml.scm

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


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
M
M
Maxim Cournoyer wrote on 22 May 2023 16:25
(name . Bruno Victal)(address . mirai@makinata.eu)(name . bug-guix)(address . bug-guix@gnu.org)
871qj8jveh.fsf@gmail.com
Hi Bruno,

Bruno Victal <mirai@makinata.eu> writes:

[...]


Toggle quote (41 lines)
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright <C2><A9> 2017, 2021, 2023 Ricardo Wurmus <rekado@elephly.net>
> ;;; Copyright <C2><A9> 2017, 2018, 2021 Julien Lepiller <julien@lepiller.eu>
> ;;; Copyright <C2><A9> 2018 G<C3><A1>bor Boskovits <boskovits@gmail.com>
> ;;; Copyright <C2><A9> 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
> ;;; Copyright <C2><A9> 2020 Vincent Legoll <vincent.legoll@gmail.com>
> ;;; Copyright <C2><A9> 2021 L<C3><A9>o Le Bouter <lle-bout@zaclys.net>
> ;;; Copyright <C2><A9> 2022 Christopher Baines <mail@cbaines.net>
> ;;;
> ;;; This file is part of GNU Guix.
>
> …
>
>
> This can be worked around by setting the LESSCHARSET environment variable:
>
> ~/src/guix [env]$ LESSCHARSET=utf8 less gnu/packages/java-xml.scm
>
>
> Which will correctly display (without any prompts):
>
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2017, 2021, 2023 Ricardo Wurmus <rekado@elephly.net>
> ;;; Copyright © 2017, 2018, 2021 Julien Lepiller <julien@lepiller.eu>
> ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
> ;;; Copyright © 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
> ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
> ;;; Copyright © 2021 Léo Le Bouter <lle-bout@zaclys.net>
> ;;; Copyright © 2022 Christopher Baines <mail@cbaines.net>
> ;;;
> ;;; This file is part of GNU Guix.
>
> …
>
> 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>.

So GUIX_LOCPATH is *not* set, right? Could you try adding 'glibc' to
the environment as well? It's the one providing the GUIX_LOCPATH search
path.

--
Thanks,
Maxim
B
B
Bruno Victal wrote on 30 Jun 2023 17:07
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 63608@debbugs.gnu.org)
cdbf542f-3b3d-34a3-3b73-13b406f642a4@makinata.eu
On 2023-05-22 15:25, Maxim Cournoyer wrote:> So GUIX_LOCPATH is *not* set, right? Could you try adding 'glibc' to
Toggle quote (3 lines)
> the environment as well? It's the one providing the GUIX_LOCPATH search
> path.

The issue still remains (with and without glibc-locales):

Toggle snippet (10 lines)
~/src/guix$ guix shell --pure less glibc glibc-locales
~/src/guix [env]$ less gnu/packages/java-xml.scm
"gnu/packages/java-xml.scm" may be a binary file. See it anyway?

~/src/guix [env]$ echo $GUIX_LOCPATH
/gnu/store/654wv1gyw1r2gpcwggmn8spbcrq5b9vq-profile/lib/locale


--
Furthermore, I consider that nonfree software must be eradicated.

Cheers,
Bruno.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 63608@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 63608
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch