Rogue CR/LF in Myfile.Designer.cs code

T

teddysnips

I'm collaborating on a project with a colleague, sharing files through
SourceSafe.

So, I run GetLatestVersion and suddenly I have 264 build errors - all
"Unexpected character"

The file in question is Myfile.Designer.cs and contains a number of
rows looking like this:

/// <summary> à¨à´€
/// Clean up any resources being used.à¨à´€
/// </summary>à¨à´€
/// <param name="disposing">true if managed resources should be
disposed; otherwise, false.</param>à¨à´€
protected override void Dispose(bool disposing)à¨à´€
{à¨à´€
if (disposing && (components != null))à¨à´€
{à¨à´€
components.Dispose();à¨à´€
}à¨à´€
base.Dispose(disposing);à¨à´€
}à¨à´€

This displays correctly in GoogleGroups interface - I hope it displays
correctly in news readers (I have to use GG because our sysadmin won't
(or can't be bothered to) allow newsgroups through Exchange. If you
can't see it, every line is terminated with the characters CR (0D) and
LF (0A).

This does not happen on his machine - the code displays correctly.
I've checked through SourceSafe and the files are identical. We can't
find anything on our respective machines' setup that is different -
both running VS2005 SP1.

Thoughts?

Edward
 
P

Peter Duniho

[...]
This displays correctly in GoogleGroups interface - I hope it displays
correctly in news readers (I have to use GG because our sysadmin won't
(or can't be bothered to) allow newsgroups through Exchange. If you
can't see it, every line is terminated with the characters CR (0D) and
LF (0A).

This does not happen on his machine - the code displays correctly.
I've checked through SourceSafe and the files are identical. We can't
find anything on our respective machines' setup that is different -
both running VS2005 SP1.

I'm not convinced those are CR and LF characters at the ends of your
lines. After all, CR and LF are normal line termination characters, and
yet the characters you posted show up as placeholder boxes in my
newsreader. When I look at the actual message text, they are shown as
"=E0=A8=8D=E0=B4=80". What that is, I'm not sure, but it's not a CR/LF
pair.

So my first suggestion is that the characters aren't CR and LF
characters. Why would extra CR/LF pairs cause any trouble anyway? This
is normal behavior on Windows computers in the first place, to have those
characters at the end of each line.

If you are absolutely sure that you do in fact have CR and LF characters
that are causing problems, then IMHO, if you can figure out why having
CR/LF causes trouble, that will be the answer to your problem. The fact
that the files are identical on both computers isn't all that surprising,
since you haven't described anything that would be unusual about the file
anyway. What _is_ unusual is that your Visual Studio is somehow confused
by normal line terminators.

Why that would happen, I don't know. But I'd say that the first place to
look is at your Visual Studio configuration and installation.

Assuming, of course, that those are in fact CR and LF characters. If you
do actually have "rogue CR/LF" in your code, then maybe you can explain
why your post included those odd-ball characters instead.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top