LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Kmail cut and paste multiple spaces

[ILUG] Kmail cut and paste multiple spaces

Seán Mac Suibhne SeanMac2003 at eircom.net
Thu May 19 00:42:23 IST 2005


Scríobh Brian Foster 
Brian 
Just to tell the series of events

I use Kmail as an email client.
When I got Nialls email I cut and pasted the line in question to the terminal 
window to a bash shell. and as I said I got an error when I ran the command.
I cut and pasted the command and result to a new email and sent it to ILUG

Tonight I wrote a programme in Yabasic to give me the ASCII value of each of 
the characters in that line in the email and it turns out that both are 
spaces with ASCII value of 32.
I cut and pasted the line again from Nialls email to an open file being edited 
by vi. I could see a strange character between the 2 spaces on the line. When 
I got the ASCII values for those spaces the first one was 32 and the second 
was 160. 

It seems that somewhere between the cutting from the email and the pasting in 
the command line the second ASCII 32 was translated to an ASCII  160 as you 
say. Was there ever so much trouble generated by one invisible character? 

Sorry for all the trouble it caused!

Seán
>   | From: Cian Cullinan <cian.cullinan at gmail.com>
>   | Date: Wed, 18 May 2005 09:48:08 +0100
>   |
>   | On 5/18/05, Brian Foster <blf at blf.utvinternet.ie> wrote:
>   |  > I believe Seán said he cut and pasted the results [ ... ],
>   |  > so looking at the raw results [ in his original posting ]
>   |  > we see there is an extra character — U+00A0 (which happens
>   |  > to be invisible) — before the `-s', and hence what he
>   |  > apparently effectively typed was:   ln FILE FILE FILE
>   |
>   | Well done for spotting that.  Can I ask what reader you used that
>   | showed up the invisible character and what one would have to type
>   | to create it?
>
>  thanks.
>
>  I use MH (nmh-1.1-RC1), running in an X-terminak
>  (ATM, a KDE `konsole') in a UTF-8 locale; but the
>  key point is I have not bothered to configure MH
>  to do anything sensible with non–UTF-8 charsets.
>  hence, everything is simply printed as-if it is
>  legal UTF-8 (i.e., raw (no conversion)).  Seán's
>  posting was ISO-8859-1, where the single byte 0xA0
>  is the character U+00A0 (more on this character
>  below).  however, the single byte 0xA0 is not a
>  legal UTF-8 sequence, so what I saw was a blob
>  representing “illegal UTF-8 sequence”.
>
>  presuming Seán did type it (I have some doubts),
>  I have no idea what keystroke(s) he used.  but I
>  have a *speculative* guess ....
>
>  the character itself is curious.  U+00A0 is the
>  “NO-BREAK SPACE” (formerly called “NON-BREAKING
>  SPACE”), abbreviated “NBSP”.  the Eesti Keele
>  Instituut (Institute of the Estonian Language)
>  database indicates it is equivalent to the HTML
>  entity “&nbsp;” (which is what one would guess):
>
>    http://www.eki.ee/letter/chardata.cgi?ucode=A0
>
>  as such, I errored in calling it invisible.
>  it should always render as a space (albeit one
>  that is never converted to a newline).  which,
>  in fact, if you look closely (at the _original_
>  posting!), it does render as a space.  ( you must
>   look at the Seán's original since some of the
>   follow-ups/replies somehow ate the character?
>   a fixed-width ISO-8859-1 or ISO-10646 font will
>   also help. )
>
>  but did Seán actually type it?  well, if you look
>  at Niall's (original!) suggestion, it _also_ has
>  two space-rendering characters.  however, both are
>  real spaces (U+0020).   so this forensic e-mail
>  evidence does suggest the NBSP somehow originated
>  on Seán's machine, with the intriguing coincidence
>  that Niall's apparent spacing was identical.
>
>  so my *speculative* guess is this:  Seán did the
>  sensible thing, and just copy-and-pasted Niall's
>  suggestion.  however, the MUA Seán used — which
>  seems to be “KMail/1.7.2” — is one that modifies
>  the content (e.g., wraps lines (we can confirm
>  this since some of his posts have newlines where
>  no newline should be)), and in an hacked attempt
>  to compensate for this fscking stupid brain damage,
>  treats all(?) second and subsequent spaces as-if
>  they were NBSP.  upshot is Seán, inadvertently
>  and quite innocently, copied a real-space and an
>  NBSP, with the baffling results he then posted — all
>  due to the idiocy (IMHO) of MUAs that modify the
>  e-mail's contents, and hence mangling Niall's
>  accidental double-real-space.
>
>  ( as you might guess, MH does no such thing:  I know
>   how to use the <Return> key! )
>
>  this could (easily) be completely wrong!  ;-\
>  and if even vaguely correct, it suggests that the
>  shell Seán (presumably bash(1)) does not consider
>  NBSP to be a word separator?   ( actually, I just
>   tested “GNU bash, version 2.05b.0(1)-release”,
>   and it indeed does not consider NBSP a separator.
>   also, X11 copy-and-paste does, correctly (IMHO),
>   preserve NBSP as NBSP.  so, did Kmail convert
>   a real-space to an NBSP? )
>
> cheers,
> 	-blf-




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell