Re: hidden characters in source code causing compiler grief



On Apr 9, 5:56 pm, vlsidesign <ford...@xxxxxxxxx> wrote:
On Apr 8, 6:00 pm, luserXtrog <mijo...@xxxxxxxxx> wrote:



On Apr 8, 7:27 pm, vlsidesign <ford...@xxxxxxxxx> wrote:

On Apr 8, 4:53 pm, luserXtrog <mijo...@xxxxxxxxx> wrote:

On Apr 8, 6:25 pm, vlsidesign <ford...@xxxxxxxxx> wrote:

<snip>

man iso_8859-1 identifies \240 as
NO-BREAK SPACE
and \302 as
LATIN CAPITAL LETTER A WITH CIRCUMFLEX

It seems likely that the file passed through the grubby hands of a
word processor. If one must be used, it may be found useful to select
a very primitive "terminal" font. This may help by making non-ASCII
character stick out like a sore thumb.

For that matter, they should stick out in vi. For me, \302 looks like
a lowercase y with 2 dots, and \240 looks like a Russian cursive d.

I don't see either of these on the corresponding snippet. Was it
pasted or retyped?

shell$ more prime.c    //I more prime.c and then I copy and paste to
below

Right on! I take it back. But do they show in vi? You should
be able to substitute them away :%s/^V302//g  :%s/^V240//g
(where ^V is ctrl-V, of course:).

--
laxdroog

I used this command from poster (thanks)
env LANG=C vi filename.c

and now it looks like this:

#include <stdio.h>
#include <stdbool.h>
int| main(void)
{
| | int| | | | number;
| | int| | | | d;
| | _Bool| | isPrime;| //| set| to| 0| if| number| is| non­prime
| | int| maxNum;
<snip>

I tried both your substitutions but they didn't work. I also tried the
pipe character and it doesn't work. I tried in vi mode, and env LANG=c
vi mode as well.

I at a loss to fathom what is going on here.
I cannot imagine whence the pipe (| vertical bar character) entered
either the file in question or the conversation as I have followed it.

Have you tried ed? Surely it's still limited to ascii by default?!

I was able to remove the bars from the snippet by pasting into vi (in
insert mode) and typing :%s/|//g

I do not intend the following question to be offensive, merely
desperate: did you happen to type the bar between the second and third
slash (/ forward slanting bar character)?

Violently scratching scalp...

--
leeeeeeeeeeeeeeext
.



Relevant Pages

  • [telecom] Bell System binary - one more item...
    ... binary coding scheme called "2 out of 5" to represent a digit. ... (The "0" bit value could, of course, be a parity bit - I'm not sure now how ... Each bar code has a long bar at the beginning and end of the ... Between those two long bars are the five bits of each character ...
    (comp.dcom.telecom)
  • Re: Where did Microsoft hide the Count Characters option?
    ... Right click the status bar and select Column ... which, as I'm sure you know, provides the character count. ... Microsoft Office MVP ... MVP FAQ site: http://mvps.org/ ...
    (microsoft.public.word.newusers)
  • [telecom] Re: Bell System binary? [telecom]
    ... binary coding scheme called "2 out of 5" to represent a digit. ... would have been referred to as a parity bit). ... Each bar code has a long bar at the beginning and end of the ... Between those two long bars are the five bits of each character ...
    (comp.dcom.telecom)
  • Re: DS9 - An Ezri episode!
    ... Yesterdays Nog episode with him in the holodeck with the Vic Damone character what was that all about? ... the bar can get bigger and bigger he could talk to Odo on the radio before now. ... only because it's on at 8pm and that's the time to sit down for tea, everyone gets in from whatever activity they do for that time. ...
    (uk.media.tv.misc)
  • In a timeline pinch (Suspense: 25Jul05) pleading for assistance - Q1
    ... It will print out the computer's internal code for the character '7' ... It is never necessary to use an int for character processing. ... making an assignment to a pointer variable. ...
    (comp.lang.c)