/    Sign up×
Community /Pin to ProfileBookmark

"" Strange characters…

Ok, my index.htm file setups up some frames. One horizontal for the header of the site and two vertical below that. Everythings works but…

When using IE everything appears fine, but if I use firefox or netscape i get this “” set of odd characters that inserts itself to the left of the <html> tag like  <html> This makes everything on my header messed up as you can imagine.

Any tips on why this might occur? Netscape and FF do support frames, so i don’t thinks it’s that.

to post a comment
HTML

24 Comments(s)

Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — I should also add that opera, at least on my linux box which shouldn't make a difference, displays everything just fine. So, nobody blame IE for not following standards or something similar! ?
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — aha at last!! somebody with the same problem. exactly the same with me and i have no idea why, and it seems nobody else does, someone please help!.
Copy linkTweet thisAlerts:
@NogDogJul 21.2005 — Pretty tough for us to debug it without either a link to the page in question or a copy of the source code.
Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — well thank god someone else has this problem!

bogbrushian, you wouldn't happen to have french or german text in your header would you? I just noticed that Fracaise isn't appearing right either, but all the toher french words and german umlauts are.

Also, do you have any meta-tags with character sets in them???
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 21.2005 — I would think the most likely explanation is the pages have been authored in something they shouldn't have been that has spat out the usual MS proprietary crap into the doc and screwed it MS Word? (I pray not) Front Page?

I'd say the likely explanation for Opera not displaying them is that Opera likes to try and pander to IE and so will do its level best to emulate the erroneous behaviour of IE. Either that or Opera is just assuming the ISO 8859-1 encoding and discarding anything that it encounters that does not come from 8859-1.

Have you checked it in Konqueror or any other decent browsers?
Copy linkTweet thisAlerts:
@NogDogJul 21.2005 — For that matter, have you run the pages through the [url=http://validator.w3.org/]w3.org validator[/url]?
Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — nogdog, point taken.

this first bit of code is the index.html file...with some editing of course.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<html>
<head>
<title>xyz</title>
</head>



<frameset rows="17%,*" frameborder="0" border="0" framespacing="0">

<frame NAME="top" scrolling=no src="header.htm">

<frameset cols="36%, *%">

<frame scrolling=no NAME="left" src="leftpane.htm">
<frame NAME="middle" src="middlepane.htm">
</frameset>

</frameset>

</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


And below is the header.htm file with the messed up french character and the source just as it appear through FF (which is the messed up way):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<html>
<head>
<title>xyz</title>
</head>



<SCRIPT type="text/javascript">
<!----hide
function french()
{
parent.left.location="french/leftpane.htm";
parent.middle.location="french/middlepane.htm";
}

function german()
{

parent.left.location="german/leftpane.htm";
parent.middle.location="german/middlepane.htm";

}

function home()
{
parent.left.location="leftpane.htm";
parent.middle.location="middlepane.htm";
}
//------>
</SCRIPT>


<body bgcolor=98AFC7 vlink="#FDD017" alink=#FDD017 marginheight="0" topmargin="0">


<table height=47% width=40% align=center border=0>

<td align=right>
<img src="pics/title_red.jpg" height=100% width=100% >
</td>
</table>


<table height=40% width=77.8% align=center cellspacing=3 cellpadding=1
border=3 >


<tr >
<td align=center width=33% bgcolor=5E7D7E>
<A HREF="javascript:french()"><font size=4 color="#FDD017">Français home</font></a></td>

<td align=center width=33% bgcolor=5E7D7E>
<A HREF="javascript:german()"><font size=4 color="#FDD017">Deutsch home</font></a></td>


<td align=center width=33% bgcolor=5E7D7E>
<A HREF="javascript:home()"><font size=4 color="#FDD017">English home</font></A></td>
</tr>
</table>

</body>
</html>
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — i forgot the link. [URL=http://www.huntersonline.org.uk/new]www.huntersonline.org.uk/new[/URL]

i have a thread going on this in CSS - [URL=http://www.webdeveloper.com/forum/showthread.php?p=405588#post405588]http://www.webdeveloper.com/forum/showthread.php?p=405588#post405588[/URL]

No I'm not using any different languages.

Here's my code for your ease ?

HTML
[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="style.css" rel="stylesheet" media="screen" type="text/css" />

<title>huntersonline.org.uk - Family website of the Hunters</title>
<head>

<body>
<script type="text/javascript" src="http://www.makepovertyhistory.org/whiteband_small_right.js"> </script><noscript><a href="http://www.makepovertyhistory.org/">Make Poverty History</a></noscript>

<div id="container">

<div id="header"></div>

<div id="mainlinkscontainer">
<div id="mainlinks">
<a id="on" href="index.html" title="hunters online home page">Home</a>
<a href="http://secure.huntersonline.org.uk/" title="family members' login">Login</a>
<a href="http://ian.huntersonline.org.uk" title="Ian Hunter's mini-site">Ian Hunter</a>
<a href="http://rugby.huntersonline.org.uk/" title="youth rugby union in scarborough">Rugby</a>
<a href="/guestbook/" title="guestbook">Guestbook</a>
<a href="contact.html" title="contact">Contact</a>
</div>
</div>

<div id="leftcolumn">
<p>The home of the Hunter family on the web.</p>
</div>

<div id="content">
<h1>Welcome to Hunters Online</h1>
<h2>July 2005</h2>
<p>Welcome to the new design for Hunters Online. More content is due to be added soon so please check back regularly.</p>
<p>Soon: Brand new rugby website for Scarborough Under 17s' upcoming season. To include fixtures, pictures, team info. and more!</p>
</div>

<div id="footer">
&copy; 2005 Hunters Online. All rights reserved.
</div>

</div>
</body>

</html>[/CODE]


CSS
[CODE]body {
margin-top: 40px;
margin-bottom: 40px;
background-color: #3281ec;
color: black;
font-family: Verdana, Arial, Helvetica, sans-serif;
padding: 0px;
}

h1 {
font-size: 1.2em;
color: #3281ec;
}

h2 {
font-size: 1em;
color: #01ab0c;
}

img {
border: 0px none;
}

#container {
position: relative;
margin-left: auto;
margin-right: auto;
width: 700px;
border: #D0D0D0 2px solid;
background-color: white;
}

#header {
background-image: url(logo.jpg);
background-position: top left;
background-repeat: no-repeat;
background-color: #01ab0c;
width: 700px;
height: 100px;
}

#mainlinkscontainer {
background-image: url(main_links_bg.jpg);
background-repeat: repeat-x;
width: 700px;
height: 32px;
border-top: #D0D0D0 2px solid;
border-bottom: #D0D0D0 2px solid;
}

#mainlinks a:link,
#mainlinks a:visited {
display: block;
float: left;
background-image: url(main_links_bg.jpg);
font-size: 13px;
font-weight: bold;
text-decoration: none;
text-align: center;
color: black;
padding: 8px;
border-right: #D0D0D0 2px solid;
}

#mainlinks a:hover,
#mainlinks a:active,
#mainlinks a#on {
background-image: url(main_links_bg_dark.jpg);
color: #3281ec;
}

#leftcolumn {
background-color: white;
padding: 10px;
width: 130px;
float: left;
color: #01ab0c;
font-size: 0.8em;
}

#content {
background-color: white;
padding: 10px;
width: 530px;
float: left;
}

#footer {
background-color: #01ab0c;
width: 680px;
padding: 10px;
font-size: 0.9em;
float: right;
border-top: #D0D0D0 2px solid;
}[/CODE]


Cheers
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — and do not fear, i wouldn't touch FrontPage with a bargepole. hand-coded ?
Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — i just checked out your site. no offense, but i'm so happy to see your site is messed up like mine ;-)

ya know, I accidentaly(paranoia realy?) deleted my meta tags in the above posted code, but i noticed you're using the same western euro charset(iso-8859-1) as me, instead of using UTF-8...that's the only similarity I can see, other than my html code being done without a helper application as well.

I'll remove the meta tag and see if that does it...to be continued....
Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — hmm, well, i removed the meta tag witht he western euro charset and the symbol is now gone, but my header is still displaced as if the character is still there. very odd...

the image which is the title_red.jpg in the above source code i posted is seriusly strecthed out...but if I refresh the page it goes back to normal and with no "strange characters". ?
Copy linkTweet thisAlerts:
@mikeghetauthorJul 21.2005 — mr herer,

funny, i didn't see your post originally.

I didn't use any helper apps for my html code.

I tried it with netscape and firefox and both showed the funny symbols. Without the meta tag that uses the 8859 charset everything is fine. It hardly seems to be an IE thing...more like a netscape technologies(FF is built off this) thing not interpreting the meta tag attributes properly.
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — there is not displacement with my page, and when the tag is removed the symbol goes ? . What charset would be recommended (im in the UK)? I've also asked on my thread about the encoding with notepad. should it be UTF-8?

[URL=http://www.webdeveloper.com/forum/showthread.php?p=405858#post405858]http://www.webdeveloper.com/forum/showthread.php?p=405858#post405858[/URL]
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 21.2005 — I'd definitely go for utf-8, just for a bit of extra flexibility. As for notepad, I dunno. At a guess I'd assume it'd just use ASCII by default. I'll just run yer pages through the validator and see what it comes up with. By any chance, have these html files ever been used or otherwise opened on a Mac?
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — no sorry, if thats a disappointment.
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 21.2005 — Aha! I think I found it.

From the validator:

The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.
[/quote]


Get rid of the BOM and you'll probably be fine. ?
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — Kind of confused. I guess that's talking about the charset stated in the html document?
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 21.2005 — Have a read at this, it'll explain it better than I could ever hope to. http://www.unicode.org/faq/utf_bom.html#22
Copy linkTweet thisAlerts:
@bogbrushianJul 21.2005 — right, ive learnt about the character encoding stuff. so il put charset text in the html document. with notepad, when saving the document, should i select UFT-8 encoding. im guessing that's what cuteftp sends the file as -still a bit confused, although i understand the concept of charsets and about declaring it in the document. *shakes fists* Thankyou for your help BTW
Copy linkTweet thisAlerts:
@felgallJul 21.2005 — ...
Copy linkTweet thisAlerts:
@Stephen_PhilbinJul 21.2005 — Aye. Make sure you declare the encoding and that you declare the encoding used and served. See if there's an option anywhere for saving the file without the Byte-Order Mark. Either that or use an actual editor rather than notepad. I know [url=http://www.ornj.net/software/araneae/]Araneae[/url] and [url=http://www.jedit.org/]JEdit[/url] are fine. I would imagine [url=http://www.chami.com/html-kit/]HTML-Kit[/url] will be perfectly fine also. They might not fix your current documents, but they should make sure any future documents you produce will be fine.
Copy linkTweet thisAlerts:
@mikeghetauthorJul 23.2005 — hmm...how come I don't get email updates when someone respnds to a thread i'm in?



Long story short...I was hosting my own site using Apache while I was building it. In the httpd.conf file apache uses utf-8 as its default language charset. Meaning all http request sent froma browser will use this default language encoding. When I'd open up my website on a windows box(IE) there was no funky character in the top left corner, but french and german wouldn't display properly. I eventualy changed the apache default language to use 8859-1 charset and suddenly the french and german text displayed properly, from IE and FF. However, when I used the meta tag with the same charset(8859) in the html code that's when the "funky" charcters appeared.

The meta tag is supported by netscape and FF is derived from netscape, so this is why they both screw up i suppose. I think this is a bug in netscape not improper use of encoding char sets or simply html tags.

Perhaps Netcrappy Navigator will get their act togehter and fix this bug..well, that is assuming they support the meta tag and the charset attribute.

I think you'll be fine if you odn't use the tag at all...I've tested my site on several browsers and all seems well.
Copy linkTweet thisAlerts:
@mikeghetauthorJul 23.2005 — """""there is not displacement with my page, and when the tag is removed the symbol goes . What charset would be recommended (im in the UK)? I've also asked on my thread about the encoding with notepad. should it be UTF-8?

"""""

I looked at your site the other day and it seemed kind of scrambled...i thought it was due to the strange characters, but you say no?

I don't think it matters what your encoding is on the text file, because the browser should only interpret the html tags inside the text file. I would only think this if it embedded characters in the file and the browser read such data. I specifically say this is not it because what is so special about the meta tag that contains the charset attribute that text pad would do something stupid to it?? I also use many editors as i'm editing..windows textpad(awesome, free, editor), and gedit on linux,. But, maybe i'm wrong and this is the issue, not netcrappy navigator.

{edit} ok, i take back half of what i said. i just ssh'd to my linux server, opened up my header file using emacs and the damn character was in it! I used cat and it was there too! But, when I used cat this is the tag it showed instead of the odd characters: "<feff>"[negative hex value?] Very very strange. Ok, so I edited the file with VI and removed the <feff>but something kind of odd happened...it acted as if it were one character, not 7. Reopend with VI and it wasn't there.

Even if I blame it on text pad (windows text pad), then why don't none of my other files have this in them?? Why does only the header file which is the first file to be loaded for my site and the same goes for the hunters.uk website...it's default page is what's loaded first. Any relation to it being the first loaded file by the browser?? Why did the charcters go away, for both of us, when the meta tag was removed, if it is the windows text pad editor???

the world may never know.... ?
Copy linkTweet thisAlerts:
@mikeghetauthorJul 23.2005 — Oh, ok, one more thing...

this contradicts what one my statements above...

when using text pad on windows and then opening the file with VI, the crarriag return show up(^M)...i don't think Unix supports carraige returns, only line feeds, and that's why when windowns embeds the carriage reutn in the file Unix spits it out. Same thing with the ""...??? Again, why only the one file and why does removing the meta tag fix it???

The last question is my central themese if u haven't noticed!
×

Success!

Help @mikeghet spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...