Hi, and thanx cipa for your soulution.
I have now printed the list via a snippet I found here on the forum, and it works. But when I got that to work the encoding for the Wayfinder menu (only on the same page I got the list) stopped working. So now my swedish letters in the menu looks like this: Ö Ä
First I didn’t got the swedish letters to work in the list. But then I found that it might work with mysql_query("SET NAMES utf8"); and it did. But that’s when the menu crached.
Here is the snippet:
<?php
mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER_SET utf8");
$output = '';//create variable for holding the output
$sql = $modx->db->query( 'SELECT * FROM `modx_kunder`');//define the DB query, in this case the table is named 'tblprojects', add WHERE AND etc. as needed
$resultArray = $modx->db->makeArray( $sql );//put it into an array
foreach($resultArray as $item)//go through each record in the array
{//start looping through the data array
$params['stores']=$item['Stores'];//set the placeholders, the $params sets the name of the placeholder, the $item is the column name from the DB table
$params['adress']=$item['Adress'];
$params['postnr']=$item['Postnr'];
$params['ort']=$item['Ort'];
$params['telefon']=$item['Telefon'];
$output.=$modx->parseChunk('StoresTpl', $params, '[+', '+]');//define the chunk name and process the content, here it's ProjectTpl which has the placeholders for the data
}//finish looping through the data array
return $output;//now return the output from the processed chunk
?>
Encoding:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Database:
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf_swedish_ci (same at the tables)
Anyone got an idé of what’t wrong?
I am so greatful for your help, THANX!