coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in expand ?


From: Dominique Martinet
Subject: Re: Bug in expand ?
Date: Fri, 13 Nov 2020 16:45:54 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

✓ Paul Courbis de Bridiers de Villemor wrote on Fri, Nov 13, 2020:
> I'm using expand to get formatted output. I've noticed that its behavior is
> incorrect with non-ascii texts :
> 
> $ /bin/echo -e "Réseau\tInterface\nLAN\teth1" | expand
> Réseau Interface
> LAN     eth1
> 
> (one missing space before Interface)
> 
> If using it with pure ascii :
> 
> $ /bin/echo -e "Reseau\tInterface\nLAN\teth1" | expand
> Reseau  Interface
> LAN     eth1
> 
> Looks like expand considers that UTF-8 Unicode text character "é" is 2
> characters long.
> 
> Versions tested :
> - expand (GNU coreutils) 8.26 - Debian, Cygwin
> - expand (GNU coreutils) 8.30 - Debian

This appears to work correctly with an UTF-8 locale and coreutils 8.32 ;
so probably fixed at some point.

$ /bin/echo -e "Réseau\tInterface\nLAN\teth1" | expand
Réseau  Interface
LAN     eth1
$ expand --version
expand (GNU coreutils) 8.32
$ locale
LANG=en_US.utf8

-- 
Dominique



reply via email to

[Prev in Thread] Current Thread [Next in Thread]