By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 1,922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

Debugger getting confused - any suggestions?

P: n/a
Hi - I have completely rebuilt my PC from scratch and it's running XPsp2 and
VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
the VS2003 debugger, I get the following error message (the following is an
example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a non-ASCII
character.

However, the SAVED code line in question is:
abcdef = hij.

To get rid of this problem, I have to re-start IIS and re-start the
debugging process. It usually then falls over on a later line with the same
error message.

As you can imagine, it's a little frustrating, but can't think how best to
go about fixing the problem. Any suggestions would be appreciated (By the
way, this combination of IIS, VS2003 & Classic ASP has worked well for about
2 years now so it's not that they're inheriently incompatible).

Griff
Feb 15 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Griff wrote:
Hi - I have completely rebuilt my PC from scratch and it's running
XPsp2 and VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way)
through the VS2003 debugger, I get the following error message (the
following is an example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a
non-ASCII character.
This has happened to me when I've edited a file in a different editor that
saved the file in unicode format. It has also happened when I've pasted text
that contained unicode characters into an asp file and saved it. The only
way I've ever been able to prevent it is to make sure VS never saves a file
in unicode (it does prompt me when unicode characters are encountered). When
the error occurs, I wind up having to retype the affected portion to get rid
of the unicode character(s).
>
However, the SAVED code line in question is:
abcdef = hij.
Yes, that's what it looks like in the text editor. However, you can rest
assured that there is a unicode character in there.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Feb 15 '07 #2

P: n/a

"Griff" <gr************@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi - I have completely rebuilt my PC from scratch and it's running XPsp2
and
VS2003 sp1.

Sometimes when I run my ASP code (this is CLASSIC asp by the way) through
the VS2003 debugger, I get the following error message (the following is
an
example):
---------------
Microsoft VBScript compilation (0x800A0408)
Invalid Character
/x/x/x/specificPage.asp, line yyy, column z
abc[]ef = hijk
---------------
- the [] is supposed to represent a square box used to display a
non-ASCII
character.

However, the SAVED code line in question is:
abcdef = hij.

To get rid of this problem, I have to re-start IIS and re-start the
debugging process. It usually then falls over on a later line with the
same
error message.

As you can imagine, it's a little frustrating, but can't think how best to
go about fixing the problem. Any suggestions would be appreciated (By the
way, this combination of IIS, VS2003 & Classic ASP has worked well for
about
2 years now so it's not that they're inheriently incompatible).
This is unlikely to have anything to do with VS2003 it isn't responsible for
the VBScript parser complaining about an invalid character.

Open the ASP file in question and goto File|Save As... what encoding does
does it think the file is using?

Does the page contain a <%@codepage directive? If so what is it?

Can you give a real example of the error instead of the pretend one you've
given?

The only possible relationship to VS2003 is that it may be saving the files
as UTF-8 instead of an OEM codepage but without a <%@codepage directive (not
recommended in this case unless applied globally to all pages) this could be
confusing the parser.

Feb 15 '07 #3

P: n/a
However, you can rest assured that there is a unicode character in there.

Hi Bob

I'm not sure that is the case though...

The file is often one that hasn't been edited for some weeks. It would have
the ReadOnly property set to TRUE. Restarting IIS then results in the file
being correctly parsed without any change to the file on disc.

Griff
Feb 15 '07 #4

P: n/a
Hi Anthony

Answers below each specific question. Also please refer to my reply to Bob
Barrows
Open the ASP file in question and goto File|Save As... what encoding does
does it think the file is using?
I opened the text file using Notepad and the encoding was ANSI
Does the page contain a <%@codepage directive? If so what is it?
It does not contain a code page directive.
Can you give a real example of the error instead of the pretend one you've
given?
Okay - in the property below the m_Menu1Colour was changed to
m_Menu[]Colour:

Public Property Let Menu1Colour(ByVal sValue)
m_Menu1Colour = sValue
End Property
The only possible relationship to VS2003 is that it may be saving the
files
as UTF-8 instead of an OEM codepage but without a <%@codepage directive
(not
recommended in this case unless applied globally to all pages) this could
be
confusing the parser.
Unfortunately I find no evidence that it is anything other than ANSI
Feb 15 '07 #5

P: n/a
In article <O1**************@TK2MSFTNGP06.phx.gbl>,
Griff <gr************@hotmail.comwrote:
>The file is often one that hasn't been edited for some weeks. It
would have the ReadOnly property set to TRUE. Restarting IIS then
results in the file being correctly parsed without any change to the
file on disc.
I'd recommend a scan for bad memory in your computer. Go to
http://www.memtest.org/ , download the .iso file, burn that to a CD,
and boot off of it. Let it run overnight, and see if it finds
anything.

Nathan Mates

--
<*Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
Feb 15 '07 #6

P: n/a
Nathan

I took your advice and yup - I had a memory problem. Memory duly swapped
and no sign of a problem, so thanks.

One thing to note - before booting from the ISO image you recommended, I
first downloaded a memory tester that works within Windows (obviously not as
thorough but quicker if it identifies the problem) from
http://hcidesign.com/memtest/ . It so happened that this identified the
memory problem immediately, so a bit of a short cut....

Griff
Mar 12 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.