Kevin Layer | 16 Feb 2012 15:28
Picon
Favicon

non-breaking spaces

When I copy the text from an mh-e buffer and use it somewhere, I often
get these weird spaces that aren't really spaces.  When I save the
copied text to a file and cat -v it, it looks like this:

  M-  M-  M-  M-  libatk-1.0.so.0 => not found

where the original text looked space indented.

Anyone else see this?  Is there a way to map these characters to plain
old spaces?

Thanks.

Kevin

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Bill Wohler | 20 Feb 2012 02:03
Picon
Picon
Gravatar

Re: non-breaking spaces

Kevin Layer <layer <at> franz.com> wrote:

> When I copy the text from an mh-e buffer and use it somewhere, I often
> get these weird spaces that aren't really spaces.  When I save the
> copied text to a file and cat -v it, it looks like this:
> 
>   M-  M-  M-  M-  libatk-1.0.so.0 => not found
> 
> where the original text looked space indented.
> 
> Anyone else see this?  Is there a way to map these characters to plain
> old spaces?

It's probably because that buffer is using a non-ASCII character set and
the sender used spaces that aren't in the usual ASCII spot. What does od
-a report on this line? Probably not sp.

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Kevin Layer | 21 Feb 2012 04:44
Picon
Favicon

Re: non-breaking spaces

Bill Wohler wrote:

>> It's probably because that buffer is using a non-ASCII character set and
>> the sender used spaces that aren't in the usual ASCII spot. What does od
>> -a report on this line? Probably not sp.

$ od -a ~/support/sa1111-example-10.small
0000000   B  sp  sp   B  sp  sp   B  sp  sp   B  sp  sp   l   i   n   u
0000020   x   -   g   a   t   e   .   s   o   .   1  sp   =   >  sp   B
0000040  sp   (   0   x   f   7   7   0   c   0   0   0   )  nl
0000056

$ 

For now, I'll do a (replace-string (char-to-string 160) " ") on
buffers that might have these, before I use them for anything but
human viewing.

Thanks.

Kevin

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Bill Wohler | 21 Feb 2012 06:14
Picon
Picon
Gravatar

Re: non-breaking spaces

Kevin Layer <layer <at> franz.com> wrote:

> Bill Wohler wrote:
> 
> >> It's probably because that buffer is using a non-ASCII character set and
> >> the sender used spaces that aren't in the usual ASCII spot. What does od
> >> -a report on this line? Probably not sp.
> 
> $ od -a ~/support/sa1111-example-10.small
> 0000000   B  sp  sp   B  sp  sp   B  sp  sp   B  sp  sp   l   i   n   u
> 0000020   x   -   g   a   t   e   .   s   o   .   1  sp   =   >  sp   B
> 0000040  sp   (   0   x   f   7   7   0   c   0   0   0   )  nl
> 0000056

A mix of 16-bit and 8-bit spaces?

You're using Emacs 23, so you should be fine. What character set is
declared in the Content-Type header field for this attachment, by the way?
Also, is there a change in behavior if you use emacs -Q?

--

-- 
Bill Wohler <wohler <at> newt.com> aka <Bill.Wohler <at> nasa.gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
(Continue reading)

Kevin Layer | 21 Feb 2012 06:18
Picon
Favicon

Re: non-breaking spaces

Bill Wohler wrote:

>> Kevin Layer <layer <at> franz.com> wrote:
>> 
>> > Bill Wohler wrote:
>> > 
>> > >> It's probably because that buffer is using a non-ASCII character set and
>> > >> the sender used spaces that aren't in the usual ASCII spot. What does od
>> > >> -a report on this line? Probably not sp.
>> > 
>> > $ od -a ~/support/sa1111-example-10.small
>> > 0000000   B  sp  sp   B  sp  sp   B  sp  sp   B  sp  sp   l   i   n   u
>> > 0000020   x   -   g   a   t   e   .   s   o   .   1  sp   =   >  sp   B
>> > 0000040  sp   (   0   x   f   7   7   0   c   0   0   0   )  nl
>> > 0000056
>> 
>> A mix of 16-bit and 8-bit spaces?
>> 
>> You're using Emacs 23, so you should be fine. What character set is
>> declared in the Content-Type header field for this attachment, by the way?

Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by freon.franz.com id q1FMZeK7004144
X-Mailfilter-Version: 1.23

>> Also, is there a change in behavior if you use emacs -Q?

Reproducing the behavior is a little involved (for no .emacs), but
when I run w/-Q I see the same weird spaces.
(Continue reading)


Gmane