Page 1 of 1

Utf8 hassle

Posted: Sun May 17, 2009 11:24 am
by satikas
Ive developed a locales system for my site, but its not working the way it should.
Let me explain:
1) This file decides which lang file to use (engine_locales_core.php):

Code: Select all

<?php session_start();
$locale = array();
$ename = $_COOKIE['user1'];
if(!isset($_COOKIE['user1'])){
    require_once "engine_locales_English.php";}
elseif(isset($_COOKIE['user1'])){
  require_once "globalconfig.php";
  $getlang = mysql_query("SELECT language FROM users WHERE ename = '$ename'")or die(mysql_error());
   while($info = mysql_fetch_array( $getlang )){
    require_once "engine_locales_".$info['language'].".php";}}
  ?>
2) And then i simply echo the sentences:
<?php require_once "engine_locales_core.php"; $locale = array(); ?>

Code: Select all

<?php echo $locale['0021']; ?>
Looks just fine when i load the page: äöüõ.
But when i refresh it, these characters turn into: ????

Whats up with that?
Thanks for any help.