From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <827c1e89c2a08eebb2fcfa3245ecc71d@krabbe.dyndns.org> References: <827c1e89c2a08eebb2fcfa3245ecc71d@krabbe.dyndns.org> Date: Mon, 22 Sep 2014 16:30:28 +0100 Message-ID: From: Peter Hull To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] plan9 legacy tcs -t unicode sucks last char Topicbox-Message-UUID: 16f5d014-ead9-11e9-9d60-3106f5b1d025 On Mon, Sep 22, 2014 at 2:19 PM, Ingo Krabbe wrote: > I will post a fix tomorrow noone else feels guilty. I can't tell if you already know the answer and are teasing us - but, I will wade in... I think the problem is in src/cmd/tcs/tcs.c, comparing unicode_out and unicode_out_be it looks like the former is trying to write out 32-bit Runes as if they were 16-bit uints. If you try echo 12345 | tcs -t unicode | xd -1x you can see what it's doing. Pete