On Sat, Nov 16, 2024 at 02:32:45PM -0700, Bob Proulx wrote:
> Previously this "worked" but I notice that now with at this the
> current Sid version it produces the following noise upon exit.
> 
>     rwp@sid:~$ env -i PATH=$PATH HOME=$HOME USER=$USER TERM=$TERM MANWIDTH=80 
> man --encoding=ASCII mv
>     man: command exited with status 127: iconv -c -f UTF-8 -t ASCII//TRANSLIT 
> | sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | 
> LESS=-ix8RmPm Manual page mv(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB 
> %pB\%.. (press h for help or q to quit)$PM Manual page mv(1) ?ltline 
> %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to 
> quit)$ MAN_PN=mv(1) pager
[...]
> Clearly I can change from ASCII to ascii and have the behavior I
> desire without an error but I report the problem regardless because it
> is a new bug appearing from somewhere.  iconv itself is working.
> 
>     rwp@sid:~$ iconv --list | grep -i ascii
>     ASCII//
>     CSASCII//
>     US-ASCII//
> 
>     rwp@sid:~$ echo dæmon | iconv -f UTF-8 -t ASCII//TRANSLIT
>     daemon

The change in behaviour is due to a change in iconv(1).  On bookworm:

  $ echo dæmon | iconv -f UTF-8 -t ASCII//TRANSLIT; echo $?
  daemon
  0

On trixie:

  $ echo dæmon | iconv -f UTF-8 -t ASCII//TRANSLIT; echo $?
  daemon
  1

I'm not currently sure whether this is a glibc bug, a case where man(1)
was always invoking iconv(1) wrongly but it only just started noticing,
or some difference in my test environments other than the OS version.

-- 
Colin Watson (he/him)                              [[email protected]]

Reply via email to