nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Thoughts: header/address parsing

2014-08-10 08:54:12
Ralph wrote:

Hi Anthony,

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.

How about -outsize, to be consistent with fmttest(1):

   The -outsize switch controls the maximum number of printable
   characters that the format engine will produce.  Characters
   marked as non-printing by the format engine with
   `%(zputlit)', characters with zero width, and extra bytes
   that are part of a multibyte character are not counted
   against this total.  Two special values are supported: “max”,
   which will set the value to the size of the output buffer,
   and “width”, which will set the value to the width of the
   terminal.

Then pad with ASCII space until C is met.

I don't think that we should add trailing space.  The output
need not be columnar.

David

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>