[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Thoughts: header/address parsing
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] Thoughts: header/address parsing |
Date: |
Sun, 10 Aug 2014 10:50:05 +0100 |
Hi Anthony,
> > $ for w in {0..9}; do
> > > echo "$w:<`scan -width $w -format '%(decode{subject})' .`>"
> > > done
> > 0:<Po£nds.>
> > 1:<>
> > 2:<P>
> > 3:<Po>
> > 4:<Po�>
> > 5:<Po£>
> > 6:<Po£n>
> > 7:<Po£nd>
> > 8:<Po£nds>
> > 9:<Po£nds.>
> > $
> >
> > Perhaps a new -runes that counts runes/glyphs/codepoints would
> > sidestep the compatibility issue, -runes trumping -width?
>
> But characters can consist of multiple codepoints (see: accents). And
> characters can be double-width. Or zero-width. Or, or, or...
OK, so we're normally after columnar output. How about `-columns C',
where the string is output, as measured by wcwidth(), until either the
string ends or C would be exceeded. Then pad with ASCII space until C
is met.
Cheers, Ralph.
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/09
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/09
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/10
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/10
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/10
Re: [Nmh-workers] Thoughts: header/address parsing, David Levine, 2014/08/16