Bizarre display behavior with "+" and "-" signs in IE 6.0 only

J

Jay

Hi,

I'm getting very strange behavior when trying to display HTML that contains
plus and minus signs in a certain sequence. The issue has to do with a plus
sign followed by alphanumeric characters followed by a minus sign (with no
spaces in-between). It's easier to show than explain. Could someone try
copying the following 3 samples and tell me what IE displays for you in each
case? I'm using IE 6.0 SP1.

(1)
<html>
<body>
+8-
</body>
</html>
(displays nothing)

(2)
<html>
<body>
a+a-t
</body>
</html>
(displays "at")

(3)
<html>
<body>
8+947asdf7987fdsfd-9
</body>
</html>
(displays "8??????9")

Note that the alphanumeric characters used in each sample are random; if I
use other characters, I still get the strange behavior. I've rebooted and
also tried on another machine (also running IE 6.0 SP1).

Can anyone shed light on this perplexing behavior?

Thanks,
Jay
 
J

Jay

(displays "8??????9")

Hopefully, this'll display correctly if I post in HTML format. Your newsreader may display it, but the question marks should be boxes:
(displays "8ïžŽíª±íŸ»ïŸŽí½¶ìŸ9")
 
J

John McGaw

Jay said:
Hi,

I'm getting very strange behavior when trying to display HTML that contains
plus and minus signs in a certain sequence. The issue has to do with a plus
sign followed by alphanumeric characters followed by a minus sign (with no
spaces in-between). It's easier to show than explain. Could someone try
copying the following 3 samples and tell me what IE displays for you in each
case? I'm using IE 6.0 SP1.

(1)
<html>
<body>
+8-
</body>
</html>
(displays nothing)

(2)
<html>
<body>
a+a-t
</body>
</html>
(displays "at")

(3)
<html>
<body>
8+947asdf7987fdsfd-9
</body>
</html>
(displays "8??????9")

Note that the alphanumeric characters used in each sample are random; if I
use other characters, I still get the strange behavior. I've rebooted and
also tried on another machine (also running IE 6.0 SP1).

Can anyone shed light on this perplexing behavior?

Thanks,
Jay

It has something to do with the browser's automatic selection of encoding.
Try right-clicking on the displayed errors and select one of the appropriate
encoding options and watch what happens. Turn off automatic selection and it
is changes too. Don't really have a clue as to why it is acting this way
unless the characters you chose are considered special by the selection
process but that seems to be too dumb to be believed, even for MS.
--
John McGaw
[Knoxville, TN, USA]

Return address will not work. Please
reply in group or through my website:
http://johnmcgaw.com
 
J

Jay

John McGaw said:
It has something to do with the browser's automatic selection of encoding.
Try right-clicking on the displayed errors and select one of the appropriate
encoding options and watch what happens. Turn off automatic selection and it
is changes too. Don't really have a clue as to why it is acting this way
unless the characters you chose are considered special by the selection
process but that seems to be too dumb to be believed, even for MS.

Thanks for demystifying this, John. What's odd is that it displays correctly
with every other endoding option *except* the default (UTF-7). What's even
more bizarre is that I started off troubleshooting the JavaScript for the
page in question because I was getting various JavaScript errors. When I
realized there was absolutely nothing wrong with the JavaScript, I
eventually whittled down a rather large page to that one character
combination. So in addition to the problem of the characters just not
showing up, they were causing JS errors. Something clearly ain't workin'
right!

Thanks for your help John,
Jay
 
M

Mark Parnell

Thanks for demystifying this, John. What's odd is that it displays correctly
with every other endoding option *except* the default (UTF-7).

Why are you using UTF-7 on a web page?

From http://www.faqs.org/rfcs/rfc2152.html :

Also as a special case, the sequence "+-" may be used to encode the
character "+". A "+" character followed immediately by any character
other than members of set B or "-" is an ill-formed sequence.
 
J

Jay

Mark Parnell said:
Why are you using UTF-7 on a web page?

I'm not. As I said, it was the default setting. I don't know how it got that
way cuz I sure didn't change it; I never modify the encoding option when
browsing, so maybe I had browsed to a page set to UTF-7 immediately before
encountering this issue.
From http://www.faqs.org/rfcs/rfc2152.html :

Also as a special case, the sequence "+-" may be used to encode the
character "+". A "+" character followed immediately by any character
other than members of set B or "-" is an ill-formed sequence.

Thanks for the info.

Jay
 
R

rf

Jay said:
(displays "8??????9")

Hopefully, this'll display correctly if I post in HTML format. Your
newsreader may display it, but the question marks should be boxes:
(displays "8??????9")

PLEASE do not post in HTML!
 
J

Jukka K. Korpela

Jay said:
I'm not. As I said, it was the default setting. I don't know how it
got that way cuz I sure didn't change it; I never modify the
encoding option when browsing, so maybe I had browsed to a page set
to UTF-7 immediately before encountering this issue.

Quite probably so. But then the problem was, in part, caused by the
test page you viewed - or, rather, by the lack of charset specification
in its HTTP headers, or even a simulation thereof in a <meta> tag.

When you view a page that has no encoding information, browsers tend to
imply the last encoding used, carrying it over from the previous page.
This may cause great confusion.
 
J

Jay

Jukka K. Korpela said:
Quite probably so. But then the problem was, in part, caused by the
test page you viewed - or, rather, by the lack of charset specification
in its HTTP headers, or even a simulation thereof in a <meta> tag.

Yes. This was a test page whose meta tags hadn't yet been set. Because I was
getting JavaScript errors, naturally the JS code was the first place I
looked, and I was getting JS errors as long as the +...- character combo was
on the page (not sure why it affected the totally unrelated JS, though) --
never occurred to me that encoding was the problem. Anyway, it's sorted,
thanks.
 
J

Jay

rf said:
PLEASE do not post in HTML!

If you read what I posted, you saw that it was the only way to show what was
being displayed in my browser, which was the point; I didn't use HTML in my
other posts, did I? Clinging to some "no HMTL posting under any
circumstances" credo is, at best, impractical and, at worst, pedantically
purist.
 
T

Toby A Inkster

Jay said:
If you read what I posted, you saw that it was the only way to show what was
being displayed in my browser

A better way would be to post the URL of a sample page exhibiting the
problem along with the URL for a screenshot of how IE 6 rendered the page
and another URL for a screenshot of how you expected it to be rendered.
 
R

rf

Jay said:
If you read what I posted, you saw that it was the only way to show what was
being displayed in my browser, which was the point; I didn't use HTML in my
other posts, did I? Clinging to some "no HMTL posting under any
circumstances" credo is, at best, impractical and, at worst, pedantically
purist.

You do realise that many news hosts disregard any post containing HTML?

Cheers
Richard.
 
J

Jay

Toby A Inkster said:
A better way would be to post the URL of a sample page exhibiting the
problem along with the URL for a screenshot of how IE 6 rendered the page
and another URL for a screenshot of how you expected it to be rendered.

I suppose if you're a member of the "no HMTL posting under any
circumstances" club, that would be better. I explained how it should've
appeared in case it didn't appear correctly; it hardly merited the effort
you suggest. One is obviously free to follow one's non-HTML-posting dogma,
but I'll decide when I feel an HTML post is appropriate, thanks.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top