I have a fresh install of Zikula 1.2.7. Just to get an option for Norwegian language I copied the locale/en to locale/no, and language/eng to language/nor. (Even if it still is english I at least have an option to transalte the needed things, and this has worked several times before)
General information
Zikula version: Zikula 1.2.7 (forest)
Server information: Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8g DAV/2 mod_jk/1.2.26
PHP version: 5.3.1
Database version: MySQL 5.0.51a-3ubuntu5.4 and MySQL client version: 5.0.51a
My problem is that 2 different programs produces different output when comes to national characters, and this is working on another site, but obiously there ARE something different i cannot figure out.
To illustrate my challenge I have combined the workig and failing code in the same PHP, and it looks like this:
Code
<?php
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
/*
Produce and display 1st line
*/
global $strFrokostVareType;
$ModName = basename(dirname(__file__));
modules_get_language();
$ModName = $GLOBALS['ModName'];
$dbconn =& pnDBGetConn(true);
$pntable =& pnDBGetTables();
include_once("header.php");
OpenTable();
/*
Produce and display 1st line (Code from working program)
*/
$Vareliste1 = mysql_query("SELECT * FROM `MyTable` WHERE `Varenr` = 0") or die(mysql_error());
while($row = mysql_fetch_array( $Vareliste1 ))
{
$strVareTypeTest2[] = $row['VareType'];
}
mysql_close();
echo "$strVareTypeTest2[0]";
CloseTable();
/*
Produce and display 2nd line (Code from failing program)
*/
mysql_connect('myhost','myuserid','mypassword') or die(mysql_error());
mysql_select_db('mydbname') or die(mysql_error());
$Vareliste2 = mysql_query("SELECT * FROM `MyTable` WHERE `Varenr` = 0") or die(mysql_error());
while($row = mysql_fetch_array( $Vareliste2 ))
{
$strVareTypeTest1[] = $row['VareType'];
}
mysql_close();
echo "$strVareTypeTest1[0]";
CloseTable();
include_once('footer.php');
?>
if (!defined("LOADED_AS_MODULE")) {
die ("You can't access this file directly...");
}
/*
Produce and display 1st line
*/
global $strFrokostVareType;
$ModName = basename(dirname(__file__));
modules_get_language();
$ModName = $GLOBALS['ModName'];
$dbconn =& pnDBGetConn(true);
$pntable =& pnDBGetTables();
include_once("header.php");
OpenTable();
/*
Produce and display 1st line (Code from working program)
*/
$Vareliste1 = mysql_query("SELECT * FROM `MyTable` WHERE `Varenr` = 0") or die(mysql_error());
while($row = mysql_fetch_array( $Vareliste1 ))
{
$strVareTypeTest2[] = $row['VareType'];
}
mysql_close();
echo "$strVareTypeTest2[0]";
CloseTable();
/*
Produce and display 2nd line (Code from failing program)
*/
mysql_connect('myhost','myuserid','mypassword') or die(mysql_error());
mysql_select_db('mydbname') or die(mysql_error());
$Vareliste2 = mysql_query("SELECT * FROM `MyTable` WHERE `Varenr` = 0") or die(mysql_error());
while($row = mysql_fetch_array( $Vareliste2 ))
{
$strVareTypeTest1[] = $row['VareType'];
}
mysql_close();
echo "$strVareTypeTest1[0]";
CloseTable();
include_once('footer.php');
?>
The two lines that are written out on my internetsite by this code is like this:
Brød/Soft Basic (Uten gluten, laktose, gjær og nøtter)
Br?d/Soft Basic (Uten gluten, laktose, gj?r og n?tter)[/code]
Everything else on the site is nice with Norwegian characters, and also emails sent out is nice.
So if anyone could give me a hint where to continue my search for this I would be for ever thankful!
Have spent 2 days looking and trying without any success......
Kind Regards!
