On 2010-06-25, George Davidovich wrote:
> I'm getting multipart/alternative emails from a Yahoo user that have a
> text/plain part like the following (modified):
>
> 32 Content-Type: text/plain; charset=iso-8859-1
> 33 Content-Transfer-Encoding: quoted-printable
> 34
> 35 George=A0=A0-=A0=A0 Lorem ipsum dolor sit amet, consectiscing elit=
> 36 Fusce sodales, sapien eu consectetur eleifend, nibh lles=A0=A0=A0=
> 37 diam=0A=0ARegards.=0A=0A=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 41 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 43 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 44 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 46 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 47 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 48 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 49 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
> 50 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
>
> As I understand it, "A0" represents the non-breaking space character.
> Mutt displays the message correctly, but in vim, the character appears
> as a pipe symbol. And, as you can tell, there's a whole lot of them.
>
> My questions, then, are:
>
> 1. Is there a mutt configuration setting I'm missing that causes vim
> to get the A0 character? Maybe this behaviour is a feature? ;-)
I don't think it's mutt; I think it's the sender's mail user agent.
I see this a lot, but only from certain senders or certain lists.
> 2. As a workaround, how do I search/replace non-printable characters
> in vim?
Here is my solution, from my ~/.vimrc:
set isprint+=160 " Add nbsp (0xa0) to the set of printable
" characters so that it will be displayed
" as the single character space rather
" than as the pair "| ". This seems to be
" supported by xterm and gvim on Unix and
" by Cygwin's rxvt on Windows. It is
" already set for gvim on Windows.
Regards,
Gary