2010/8/4 Christopher Zimmermann <madro...@zakweb.de>: > On 07/28/10 21:45, Christian Weisgerber wrote: >> Christian Weisgerber <na...@mips.inka.de> wrote: >> >>> == xterm == >> >> What doesn't work: UTF-8 mode is incompatible with 8-bit control >> sequences. If that doesn't ring a bell for you, then you don't >> need to worry about it. ;-) >> >> I only noticed because the RMC on my AlphaServer 800 inserts 8-bit >> controls to set bold and blink attributes in its status output. > > ls(1) does not seem to be 100% UTF-8 ready: > > > madro...@madthought:~% /bin/ls testb8-C4-D5-b/-\# > testo?=o?=-C4-D5-o?=o?=-# > madro...@madthought:~% /bin/ls testb8-C4-D5-b/-\# |cat > testb8-C4-D5-b/-# > > still it is a great thing that UTF-8 is working that well now. Thanks > very much to all people that have been involved with this update!! > > > Christopher > >
ls(1) needs to use wcwidth(3) instead of just assuming 1 for alignment and if I remember correctly it also mangles the strings using isprint(3) or hardcoded values instead of iswprint(3) when printing to terminal which is probably what you are seeing here. ed(1) is broken by the latter and ksh(1) for both reasons. wcwidth(3) doesn't seem to have been added yet, though.