Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starange characters being generated by Google!

Status
Not open for further replies.

Mayoor

Programmer
Jan 16, 2004
198
GB
A site I am working on is generating some starnge characters. Please go to google and type in Davis Cup. The first entry is

ÿþ< ! doctype html public " - / / W 3 C / / DTD HTML 4 . 0 ...

the characters being generated are ÿþ which is in effect causing havoc with other browsers such as Firefox and Netscape. In IE the page loads fine.

Does anyone know why these characters are generated and how I can get rid of them?
 
it looks to be a problem with the server, possibly MIME types.

received data using HTTP/1.1 (user-agent is webbug)

Code:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Connection: close
Content-Location: [URL unfurl="true"]http://www.daviscup.com/index.html[/URL]
Date: Wed, 13 Oct 2004 10:17:42 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Tue, 12 Oct 2004 14:08:10 GMT
ETag: "1e6e1e764b0c41:7d7"
Content-Length: 42742

ÿþ<tto>el
ti<da1c8'ne'e /us21ia3s'C1sb>daiHty"a onnbeilt
/tr_r'es=e_e.fsu0les igao:
and using HTTP/1.0
Code:
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Location: [URL unfurl="true"]http://xx.xxx.x.xx/index.html[/URL]
Date: Wed, 13 Oct 2004 10:24:19 GMT
Content-Type: text/html
Accept-Ranges: bytes
Last-Modified: Tue, 12 Oct 2004 14:08:10 GMT
ETag: "1e6e1e764b0c41:7d7"
Content-Length: 42742

ÿþ<vcr<0cfetM>s'pDimp
(t'me.'l2LhCnu.[sc>ttgsgiib> ii2rs"?ira
 aal<.n6>jt  caur_rim


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
off the top of my head, absolutely no idea. maybe just something hung on IIS or the server

first thing (as always) with MS try iisreset in a command prompt window or (possibly better) a server reboot (drastic I know)

download WebBug if you don't have it already

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
It seems that Google is totally 'confused' by your document type declaration.

I would try to remove it altogether.

I'm pretty sure that the keywords DOCTYPPE and PUBLIC should be capitalized and when you use public ids as you do here, you probably want also a URI after the public id, since almost all parsers rely on the URI to actually validate the document.

BTW, It can also be an encoding issue, which I doubt; might be an invisible character someplace there.

Regards,
Dan
 
I agree with ddrillich - the doctype needs the capitalisation. Use this as your doctype declaration and see how things look after Google's next crawl of your page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I don't include a URI on any of my pages - perhaps I should, but I don't get any problems.


Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
 
OK will try this when I get back to work tommorow. Another thing is once you click on the link in google it opens in IE fine, however if you try to open it in Firefox all the formatting is comepletely screwed.

This might be a further hint as to what it is. I havee been told by a few people that it could be the character set in that I need to set it to ISO 8859-1 whatever the hell that means ???

:confused:
 
probably not the char set you have it set to 1252 which is a standard windows set

to be cross platform compatible it would be better as
Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Try deleting the top line of the code for the home page and recreating the dtd from scratch. It may be there is a stray formatting character there that is throwing it out. IE will skip over anything it doesn't understand whereas the stricter browsers will fail.


Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Here's a useful template for you to use incorporating 4.01 doctype and a suitable character set:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<title>Your Page Title</title>
<meta http-equiv="content-type"content="text/html;charset=iso-8859-1">
<meta name = "description" content="A description of your site can go here.">
<meta name="keywords" content="place any,keywords,orkey phrases,you wish,to use,here">
</head>
<body>

Simply copy/paste the lot into the top of your page and fill in the bits with your own details.
Note the presence of the opening <body> tag, and don't forget any style sheet info if you need it.

Good luck. :)



Regards, Andy.
**************************************
My pathetic attempts at learning HTML can be laughed at here:
 
Right after plenty of investigation...I have established that it cannot be the doctype declaration or the characterset, because our other site... seems to work fine with the same declarations

compare the code of and and you will see this.

So I guess its back to the drawing board.

Any ideas folks?
 
there is an error somewhere on the page that is causing the problem.
I have just saved your index page to my test server and webbug shows the same fault. Having any output from the page even <html> tags has the problem. Somehow there is an embedded char in the page. Creating a new file then copy and paste in the source code seems to have worked ok.



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Chris Problem SOLVED!

It seems when I resaved the page in a new file and FTP'd it over it was fine. We have a content management system that publishes this to the live server. So I'm guessing that next time we publish this might happen again. But thats another issue at our end.

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top