nmh-workers
[Top][All Lists]
Advanced

[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: Sat, 09 Aug 2014 16:44:52 +0100

Hi David,

> 2) Optionally, the user could move to the new behavior of not
>    counting the trailing newline.

Like Python's `from future import sanity'.

A problem with ~/.mh_profile calling for sanity is that it might be
wanted generally but the user can't be sure no scripts they use want
insanity?

Is -width also only interested in counting bytes?  I'm UTF-8 here, but
get

    $ scan -format '%{subject}' .
    =?utf-8?Q?Po=C2=A3nds.?=
    $ 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?

Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]