9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] plan9 legacy tcs -t unicode sucks last char
@ 2014-09-22 13:19 Ingo Krabbe
  2014-09-22 15:30 ` Peter Hull
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Krabbe @ 2014-09-22 13:19 UTC (permalink / raw)
  To: 9fans

term% echo 'öäü'| tcs -t unicode| tcs -f unicode; echo
öä
term%

this looks quite wrong!
I will post a fix tomorrow noone else feels guilty.

Regards,

Ingo Krabbe





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] plan9 legacy tcs -t unicode sucks last char
  2014-09-22 13:19 [9fans] plan9 legacy tcs -t unicode sucks last char Ingo Krabbe
@ 2014-09-22 15:30 ` Peter Hull
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Hull @ 2014-09-22 15:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Mon, Sep 22, 2014 at 2:19 PM, Ingo Krabbe <ikrabbe.ask@gmail.com> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-22 15:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-22 13:19 [9fans] plan9 legacy tcs -t unicode sucks last char Ingo Krabbe
2014-09-22 15:30 ` Peter Hull

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).