This and other utf-8 bugs are fixed in https://github.com/ericfischer/coreutils/tree/multibyte-squash if anyone ever wants to accept the patch.
Eric On Fri, Nov 13, 2020 at 6:48 AM ✓ Paul Courbis de Bridiers de Villemor < p...@courbis.fr> wrote: > Hi > > 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 > > Thx > -- > Paul Courbis de Bridiers de Villemor >