Hi,
I really have a nut here and was wondering if anyone could help. As I learned from this forum that the template files (.TPL) could be added inn HTML code. This works fine but with the exception in the datagrids. Something is changing the letters presentation in the datagrid. When I put my html code in the header.tpl, the letters Æ, Ø and Å are not showing correct. When I take the HTML out, all looks fine. Do any of you expert have an idea?
Regards...
phpDivelog-Header.tpl
Thanks
The site that is showing the error can be veiwed at:http://divelog1.helm.no
As you can see dive 36 that looks like this: Engøy, Stavanger should look like: Engøy,Stavanger. When I take out what every HTML code I put inn all looks fine.
my header.tpl looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" >
<head>
<title>Eric's DiveLog -
<?php echo $pagetitle; ?></title><style type="text/css">
<!--
body {
background-image: url();
background-color: #996633;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/divelog.css">
<script type="text/javascript"
src="includes/lightbox/prototype.js"></script>
<script type="text/javascript"
src="includes/lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript"
src="includes/lightbox/lightbox.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/lightbox/lightbox.css">
<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<style type="text/css">
.content-box
{
margin-left:9px;
}
#footer_line
{
position:relative;
right:8px;
}
#footer_text
{
margin-top:10px;
margin-right:15px;
}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<div id="core_header">
<div id="header_text" style="width: 180px; height: 24px"><font color="#FFFFFF">Divelog for Eric </font></div>
</div>
<div id="core_container">
<div id="core_container2">
<div id="core_left">
<div id="navcontainer">
<ul>
<li><a href="index.php" title="Home">Log</a></li>
<li><a href="divestats.php" title="About">Dive Statistics</a></li>
<li><a href="divesite.php" title="Webdesign">Dive Sites</a></li>
<li><a href="equipment.php" title="Music">Dive Equipment</a></li>
<li><a href="http://www.helm.no/mediagallery/album.php?aid=22&page=1" title="Contact">Dive Pictures</a></li>
<li><a href="http://www.helm.no/index.php?topic=Dykking" title="Contact">Helm.no Dykking</a></li>
</ul>
</div>
</div>
<div id="core_right">
<div class="content-box">
<table width="625" border="0" cellspacing="0" cellpadding="0" summary="">
<tbody>
<tr>
<td width="625" valign="top">
<h1><?php echo $pagetitle; ?></h1>
</div>
<div id="footer2"><div id="footer_line"></div>
</div>
</div>
</div>
<div id="footer"> </div>
</body>
</html>
<br><br>
regards
The site that is showing the error can be veiwed at:http://divelog1.helm.no
As you can see dive 36 that looks like this: Engøy, Stavanger should look like: Engøy,Stavanger. When I take out what every HTML code I put inn all looks fine.
my header.tpl looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" >
<head>
<title>Eric's DiveLog -
<?php echo $pagetitle; ?></title><style type="text/css">
<!--
body {
background-image: url();
background-color: #996633;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/divelog.css">
<script type="text/javascript"
src="includes/lightbox/prototype.js"></script>
<script type="text/javascript"
src="includes/lightbox/scriptaculous.js?load=effects"></script>
<script type="text/javascript"
src="includes/lightbox/lightbox.js"></script>
<link rel="stylesheet" type="text/css" media="screen"
href="includes/lightbox/lightbox.css">
<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
<style type="text/css">
.content-box
{
margin-left:9px;
}
#footer_line
{
position:relative;
right:8px;
}
#footer_text
{
margin-top:10px;
margin-right:15px;
}
</style>
<![endif]-->
</head>
<body>
<div id="container">
<div id="core_header">
<div id="header_text" style="width: 180px; height: 24px"><font color="#FFFFFF">Divelog for Eric </font></div>
</div>
<div id="core_container">
<div id="core_container2">
<div id="core_left">
<div id="navcontainer">
<ul>
<li><a href="index.php" title="Home">Log</a></li>
<li><a href="divestats.php" title="About">Dive Statistics</a></li>
<li><a href="divesite.php" title="Webdesign">Dive Sites</a></li>
<li><a href="equipment.php" title="Music">Dive Equipment</a></li>
<li><a href="http://www.helm.no/mediagallery/album.php?aid=22&page=1" title="Contact">Dive Pictures</a></li>
<li><a href="http://www.helm.no/index.php?topic=Dykking" title="Contact">Helm.no Dykking</a></li>
</ul>
</div>
</div>
<div id="core_right">
<div class="content-box">
<table width="625" border="0" cellspacing="0" cellpadding="0" summary="">
<tbody>
<tr>
<td width="625" valign="top">
<h1><?php echo $pagetitle; ?></h1>
</div>
<div id="footer2"><div id="footer_line"></div>
</div>
</div>
</div>
<div id="footer"> </div>
</body>
</html>
<br><br>
regards
In my dev version I added:
You also have to change the mysql query in includes/misc.inc.php
hope it helps
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Code: Select all
function parse_mysql_query($filename)
{
mysql_select_db($db, $connection);
=>this line mysql_query("SET CHARACTER SET 'utf8'", $connection);