9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Peter Hull <peterhull90@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] plan9 legacy tcs -t unicode sucks last char
Date: Mon, 22 Sep 2014 16:30:28 +0100	[thread overview]
Message-ID: <CAK9Gx1e98-YG1YMCkoG4HVhbc_EzXt9qtzu0Afbd6NTNeMT3Uw@mail.gmail.com> (raw)
In-Reply-To: <827c1e89c2a08eebb2fcfa3245ecc71d@krabbe.dyndns.org>

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



      reply	other threads:[~2014-09-22 15:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 13:19 Ingo Krabbe
2014-09-22 15:30 ` Peter Hull [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK9Gx1e98-YG1YMCkoG4HVhbc_EzXt9qtzu0Afbd6NTNeMT3Uw@mail.gmail.com \
    --to=peterhull90@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).