EN - Technical supportproblem with utf-8


18.03.2011, 12:51 - joelkarn - webSPELL user - 167 Posts
The problem i have is that when i edit the meny with swedish word, are åäö showing up with a sign instead. Is there some one who can help with this problem.
 
18.03.2011, 13:46 - LoRd - Moderator - 4521 Posts
Get sure that your index.php is saved as "UTF8 without BOM"

If you see me laughing, you better have a backup!

 
18.03.2011, 13:55 - joelkarn - webSPELL user - 167 Posts
not working, probally doing wrong

Here are my index. what should i change to get it working

[toggle=read more]
Code:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
<?php
/*
##########################################################################
#                                                                        #
#           Version 4       /                        /   /               #
#          -----------__---/__---__------__----__---/---/-               #
#           | /| /  /___) /   ) (_ `   /   ) /___) /   /                 #
#          _|/_|/__(___ _(___/_(__)___/___/_(___ _/___/___               #
#                       Free Content / Management System                 #
#                                   /                                    #
#                                                                        #
#                                                                        #
#   Copyright 2005-2010 by webspell.org                                  #
#                                                                        #
#   visit webSPELL.org, webspell.info to get webSPELL for free           #
#   - Script runs under the GNU GENERAL PUBLIC LICENSE                   #
#   - It's NOT allowed to remove this copyright-tag                      #
#   -- http://www.fsf.org/licensing/licenses/gpl.html                    #
#                                                                        #
#   Code based on WebSPELL Clanpackage (Michael Gruber - webspell.at),   #
#   Far Development by Development Team - webspell.org                   #
#                                                                        #
#   visit webspell.org                                                   #
#                                                                        #
##########################################################################
*/

// important data include
include("_mysql.php");
include("_settings.php");
include("_functions.php");

$_language->read_module('index');
$index_language = $_language->module;
// end important data include
?>
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content=text/html; charset=UTF8 />
<meta name="description" content="Clanpage using webSPELL 4 CMS" />
<meta name="author" content="webspell.org" />
<meta name="keywords" content="webspell, webspell4, clan, cms" />
<meta name="copyright" content="Copyright &copy; 2005 - 2009 by webspell.org" />
<meta name="generator" content="webSPELL" />

<title><?php echo PAGETITLE; ?></title>
<link href="_stylesheet.css" rel="stylesheet" type="text/css" />
<link href="css/ecko.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />
<link href="tmp/rss.xml" rel="alternate" type="application/rss+xml" title="<?php echo getinput($myclanname); ?> - RSS Feed" />
<script src="js/bbcode.js" language="jscript" type="text/javascript"></script>
<script type="text/javascript" src="js/2one_navi.js"></script>
<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>
</head>

<body>
<div class="main_container">
  <div class="login_area">
       <div style="float: left;"><?php echo $myclanname ?> <span class="login_text">- http://directed9.net</span></div>
       <div style="float: right; width: 63%;">LOGIN <?php include ("login.php") ?></div>
  </div>
  <div class="header">
       <div class="head_advert"><?php include("sc_bannerrotation.php"); ?></div>
  </div>
  <div class="navi_area">
       <div id="navi">
  <ul>
          <li class="nav_button"><a href="#" onclick="show_visibility('subnav1');hide_visibility('subnav2','subnav3','subnav4','subnav5','subnav6')">Nyheter</a></li>
          <li class="nav_button"><a href="#" onclick="show_visibility('subnav2');hide_visibility('subnav1','subnav3','subnav4','subnav5','subnav6')">Spelsektion</a></li>
          <li class="nav_button"><a href="#" onclick="show_visibility('subnav3');hide_visibility('subnav2','subnav1','subnav4','subnav5','subnav6')">Föreningen</a></li>
             <li class="nav_button"><a href="#" onclick="show_visibility('subnav4');hide_visibility('subnav2','subnav3','subnav1','subnav5','subnav6')">Media</a></li>
          <li class="nav_button"><a href="#" onclick="show_visibility('subnav5');hide_visibility('subnav2','subnav3','subnav4','subnav1','subnav6')">Kontakt</a></li>
          <li class="nav_button"><a href="#" onclick="show_visibility('subnav6');hide_visibility('subnav2','subnav3','subnav4','subnav1','subnav5')">Directed Nine</a></li>
       </ul>
  </div>
       <div class="search_box"><?php include("quicksearch.php"); ?></div>
  </div>
  <div class="subnavi">
       <div id="subnav1"><?php include ("subnavis/subnav_1.php") ?></div>
        <div id="subnav2" style="display: none;"><?php include ("subnavis/subnav_2.php") ?></div>
        <div id="subnav3" style="display: none;"><?php include ("subnavis/subnav_3.php") ?></div>
        <div id="subnav4" style="display: none;"><?php include ("subnavis/subnav_4.php") ?></div>
        <div id="subnav5" style="display: none;"><?php include ("subnavis/subnav_5.php") ?></div>
        <div id="subnav6" style="display: none;"><?php include ("subnavis/subnav_6.php") ?></div>
        <hr class="hr_sub"/>
       </div>
    <!-- MAIN CONTENT -->
  <div class="content">
       <div class="content_main">
     <?php include("slider.php"); ?><br /><br /><br />
    <!-- LAST ARTICLES -->
    <div style="float: left;">
    <div class="katg_bg" style="width: 257px;">Senaste Artiklarna</div>
    <?php include ("sc_articles.php") ?>
<div align="right"><a href="index.php?site=articles" target="_self">Mer artiklar</a></div>
    </div>
    <!-- LAST ARTICLES END-->
    <!-- TOP MATCH -->
    <div style="float: left; padding-left: 8px;">
    <div class="katg_bg" style="width: 438px;">Top Match</div>
    <?php include ("sc_topmatch.php") ?>
    </div>
    <!-- TOP MATCH END -->
    <div style="clear: both;"></div>
    <hr class="hr_sub" style="margin-top: 12px;"/>
    <?php
                         if(!isset($site)) $site="news";
                         $invalide = array('\\','/','/\/',':','.');
                         $site = str_replace($invalide,' ',$site);
                         if(!file_exists($site.".php")) $site = "news";
                         include($site.".php");
                         ?>
    <div style="clear: both;"></div>
    <hr class="hr_sub" style="margin-bottom: 8px;"/>
    </div>
    <!-- MAIN CONTENT END -->
    
    <!-- RIGHT CONTENT -->
    <div class="content_right">
         <div class="katg_bg">Sponsorer</div>
          <?php include ("sc_sponsors.php") ?>
        <hr class="right_line" /><br />
        <div class="katg_bg">Senaste Matcherna</div>
          <?php include ("sc_results.php") ?>
        <br />
        <div class="katg_bg">Nya Forumtrådar</div>
          <?php include ("latesttopics.php") ?>
        <br />
        <div class="katg_bg">Omröstning</div>
          <?php include ("poll.php") ?>
        <br />
            </div>
    <!-- RIGHT CONTENT END -->
    <div style="clear: both;"></div>
  </div>
  <div class="footer">
       <div style="float: left; width: 40%; color: #FFF; margin-top: 65px; padding-left: 140px;"><?php
echo 'Copyright &copy; '.date("Y").'';
?> by <? echo $myclanname ?></div>
<div style="float: left; color: #FFF; font-weight: bold; margin-top: 15px;">
<div align="left">NAVIGATION</div>
  <div style="float: left;">
  <ul type="square">
    <li type="square"><a class="foot_links" href="index.php?site=news">News</a></li>
    <li><a class="foot_links" href="index.php?site=news&action=archive">Archive</a></li>
    <li><a class="foot_links" href="index.php?site=articles">Articles</a></li>
    <li><a class="foot_links" href="index.php?site=squads">Teams</a></li>
    <li><a class="foot_links" href="index.php?site=clanwars">Matches</a></li>
  </ul>
  </div>
  <div style="float: left;">
  <ul type="square">
    <li type="square"><a class="foot_links" href="index.php?site=awards">Awards</a></li>
    <li><a class="foot_links" href="index.php?site=files">Files</a></li>
    <li><a class="foot_links" href="index.php?site=partners">Partners</a></li>
    <li><a class="foot_links" href="index.php?site=sponsors">Sponsors</a></li>
    <li><a class="foot_links" href="index.php?site=contact">Contact</a></li>
  </ul>
  </div>
</div>
    <div style="float: right; width: 16%;">
    <a href="http://www.2one-designs.de" target="_blank"><img src="Bilder/footer_2one.png" width="153" height="128" border="0" /></a></div>
  </div>
</div>
</body>
</html>
[/toggle]
 
18.03.2011, 13:57 - N3RK0 - webSPELL newbie - 62 Posts
http://www.webspell.or...rum_topic&topic=31780

Listen to me very carefully my friend, killing will not bring you peace. -Peace was never an option. [URL=http://imposs-clan.com/][I]/* --| Nothing is Impossible |-- */[/I][/URL]

 
18.03.2011, 14:02 - LoRd - Moderator - 4521 Posts
His Problem is not related to SQL.
The Navigation is static in his PHP-Files.

@joel: It has nothing to do with the content of the index.php
- Your index.php needs to be saved as "UTF-8 without BOM"
- The PHP-Files in "subnavis" also have to be saved as UTF-8 without BOM.
-- a workaround could be to use the htmlspecialchars for it ( see: http://www.vistawide.c...n_language_characters.htm )

Please take notice that e.g. the normal notepad (coming with windows) is not able to save as "utf8 without BOM", but improved texteditors like notepad++ are able to.

If you see me laughing, you better have a backup!

 
18.03.2011, 14:04 - joelkarn - webSPELL user - 167 Posts
what should i write for code in subnavis?
 
18.03.2011, 14:19 - LoRd - Moderator - 4521 Posts
joelkarn wrote:

what should i write for code in subnavis?

Again:
The solution is to save the files as UTF-8 without BOM.
http://tinyurl.com/66qhtqu

If you see me laughing, you better have a backup!

 
18.03.2011, 14:25 - joelkarn - webSPELL user - 167 Posts
thx it worked