Re: hidden characters in source code causing compiler grief
- From: luserXtrog <mijoryx@xxxxxxxxx>
- Date: Thu, 9 Apr 2009 18:03:26 -0700 (PDT)
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| nonprime
| | 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
.
- Follow-Ups:
- Re: hidden characters in source code causing compiler grief
- From: Keith Thompson
- Re: hidden characters in source code causing compiler grief
- References:
- hidden characters in source code causing compiler grief
- From: Gary
- Re: hidden characters in source code causing compiler grief
- From: jfbode1029
- Re: hidden characters in source code causing compiler grief
- From: vlsidesign
- Re: hidden characters in source code causing compiler grief
- From: luserXtrog
- Re: hidden characters in source code causing compiler grief
- From: vlsidesign
- Re: hidden characters in source code causing compiler grief
- From: luserXtrog
- Re: hidden characters in source code causing compiler grief
- From: vlsidesign
- hidden characters in source code causing compiler grief
- Prev by Date: Re: Whats the legal state of @ character in identifiers?
- Next by Date: Re: Variable length string and fscanf
- Previous by thread: Re: hidden characters in source code causing compiler grief
- Next by thread: Re: hidden characters in source code causing compiler grief
- Index(es):
Relevant Pages
|