# Unwanted 'п»ї' text in header - shtml



## wriggly_b (Apr 4, 2009)

*Unwanted 'п»ї' text in header - shtml*

I have some unwanted characters in the top left of my webpage(s) they are 'п»ї'. When I view the source from the explorer I can see the characters, but when I go back to the editor to delete them I can't see them!!
The URL is http://www.wiihabilitation.co.uk 
How do I get rid of the п»ї ?? 
Thanks very much


----------



## dm01 (Oct 10, 2006)

*Re: Unwanted 'п»ї' text in header - shtml*

Your </head> needs to be moved to just below </script>. 
This may have unwanted effects, but this is technically correct.


----------



## wriggly_b (Apr 4, 2009)

*Re: Unwanted 'п»ї' text in header - shtml*

no joy I'm afraid. I have tried several combinations - as I notice I have 2 </script> 
I'm not really a coder and rely heavily on the editing software which isn't offering very much help at the moment - so if you have any other suggestions I would really appreciate it!! 
Thanks


----------



## maretard (Dec 26, 2007)

*Re: Unwanted 'п»ї' text in header - shtml*

Hmm... that's very odd... are you SURE you can't find the following line in your code?


```
<div id="container">п»ї<div id="header">
```
If you're absolutely sure that line does not show up anywhere in your code, can you post the code so we can help you? :tongue:


----------



## wriggly_b (Apr 4, 2009)

*Re: Unwanted 'п»ї' text in header - shtml*

The following is from the shtml file: Then Below is the includes/menu.inc code (i have highlighted where it is in the code). 
Thanks!!! - My only wonder was - does it have anything to do with the charset????

------------------------------------------------------------------
shtml file up to the content
------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<link href="style.css" rel="stylesheet" type="text/css" />

<script src="js/jquery.js" type="text/javascript"></script>

<script src="js/main.js" type="text/javascript"></script>

<title>Wii-Habilitation</title>

<style>
img
**
border: none;
}
/* */#preview
**
position: absolute;
border: 1px solid #ccc;
background: #333;
padding: 5px;
display: none;
color: #fff;
}
/* */</style>
</head>
<script type="text/javascript">

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

</script>

<script type="text/javascript">

try **

var pageTracker = _gat._getTracker("UA-7315899-1");

pageTracker._trackPageview();

} catch(err) **}</script>
<body>
<div id="container">*<!--#include file="Includes/menu.inc"-->*
<div id="content">
<div id="left">
<h1>
Games</h1>

------------------------------------------------------------------
includes/menu.inc
------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18259"></HEAD>
<BODY><div id="header">
<div id="header_text">
</div>
<ul>
<li><A href="home.shtml">Home</a>
<li><A href="therapy.shtml">Therapy</a>
<li><A href="games.shtml">Games</a>
<li><a target="_blank" href="http://natstar.moodledo.co.uk/mod/forum/view.php?f=291">Forum</a>  
<li><A href="resources.shtml">Resources</a>
<li><A href="mailto:[email protected]?subject=Wii-Habilitation enquiry">
Contact Us</a></li>
</ul>
<div id="logo_w2" style="Z-INDEX: 100; POSITION: absolute; TOP: 109px; LEFT: 23px">
<div align="right">
<div id="logo_w2" style="Z-INDEX: 100; POSITION: absolute; WIDTH: 225px; HEIGHT: 86px;
TOP: 15px; LEFT: 448px">
<p align="right">
<strong><font size="2">For those involved in the use of the Nintendo Wii as part of
therapy or rehabilitation</font></strong></p>
</div>
</div>
<strong><font size="7">Wii-Habilitation</font></strong>
</div>
</div></BODY></HTML>


----------



## wriggly_b (Apr 4, 2009)

*Re: Unwanted 'п»ї' text in header - shtml*

done it!!!
i have played around with the charset and replaced 

<META content="text/html; charset=unicode" http-equiv=Content-Type>

with 

<META content="text/html; charset=windows-1251" http-equiv=Content-Type>

and it works.....
Thanks to those who replied... ) muchly appreciated!


----------



## maretard (Dec 26, 2007)

*Re: Unwanted 'п»ї' text in header - shtml*

Good job for getting it working, although I for one don't know why the charset would introduce that garbled stuff into your code...

Oh well, perhaps dm01 will have more input on this one.


----------



## dm01 (Oct 10, 2006)

*Re: Unwanted 'п»ї' text in header - shtml*

Of course! That's a byte-order mark (BOM) that the browser has mis-interpreted as display text. Unicode uses them for a reason I don't fully understand. They are incredibly annoying for those who can't track down the cause.

Windows-1251 isn't exactly web standard, but if it works, I wouldn't change it. If you really want complete cross-compatibility, use UTF-8:

```
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
```
UTF can be used either with or without BOM, please make sure you select _without BOM_ in your text editor. Otherwise, the problems will return.


----------



## maretard (Dec 26, 2007)

*Re: Unwanted 'п»ї' text in header - shtml*

Whoa. Did not know that.

So what specific character was the BOM that the browser misinterpreted in his code?


----------



## dm01 (Oct 10, 2006)

*Re: Unwanted 'п»ї' text in header - shtml*

Those three that he was asking about.

Stay away from straight Unicode, or this may well happen to you. Use UTF-8 without BOM. ANSI has problems of its own.


----------

