Re: [dev] [PATCH] [sbase] Use utflen in cols(1)

From: Dimitris Papastamos <sin_AT_2f30.org>
Date: Fri, 5 Dec 2014 22:39:49 +0000

On Fri, Dec 05, 2014 at 02:18:03PM -0800, Robert Ransom wrote:
> On 12/5/14, Brandon Mulcahy <brandon_AT_jangler.info> wrote:
> > ---
> > cols.1 | 3 +--
> > cols.c | 14 +++++++++-----
> > 2 files changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/cols.1 b/cols.1
> > index 8f15cb3..5383e47 100644
> > --- a/cols.1
> > +++ b/cols.1
> > _AT_@ -27,8 +27,7 @@ This implementation of
> > .B cols
> > assumes that every byte is a character
> > which takes up one column on the screen.
> > -It does not handle non-ASCII UTF-8 runes
> > -or TAB characters correctly.
> > +It does not handle TAB characters correctly.
>
> utflen returns the number of runes in a string, not the number of
> character cells that will be used to display it on a terminal.

Hm... yes.
Received on Fri Dec 05 2014 - 23:39:49 CET

This archive was generated by hypermail 2.3.0 : Fri Dec 05 2014 - 23:48:07 CET