Hey there, after spending a while trying the solutions fromt he forum without success I went my own way to find a solution.
No database alternations required, just 2 small changes.
my database is in the standard utf8 general space.
1: File: inckude/mysql.php
Find:
// execute sql query
function db_query($query, $database="",$conn=""){
global $cfg;
Add immediately after:
$query=utf8_encode($query);
2. File: include/class.format.php
Find:
function htmlchars($var) {
return is_array($var)?array_map(array('Format','htmlchars'),$var): htmlspecialchars($var,ENT_QUOTES);
}
REPLACE with:
function htmlchars($var) {
return is_array($var)?array_map(array('Format','htmlchars'),$var): utf8_decode(htmlspecialchars($var,ENT_QUOTES));
}
Now it should show up the umlauts correctly and the following text too.
btw: It does not solve problems with question marks instead of umlauts in emails, that has to be solved seperately
EDIT: two more changes neccessary to make it work on client side:
3. File: class.tickets.php
find:
//Insert message from client
function postMessage($msg,$source='',$msgid=NULL,$headers='',$newticket=false){
global $cfg;
if(!$this->getId())
return 0;
//We don't really care much about the source at message level
$source=$source?$source:$_SERVER;
$sql='INSERT INTO '.TICKET_MESSAGE_TABLE.' SET created=NOW() '.
',ticket_id='.db_input($this->getId()).
',messageId='.db_input($msgid).
',message='.db_input(Format:($msg)). //Tags/code stripped...meaning client can not send in code..etc
',headers='.db_input($headers). //Raw header.
',source='.db_input($source).
',ip_address='.db_input($_SERVER);
and add immediately after:
$sql = utf8_decode($sql);
4. File: viewticket.inc.php
find:
Format:($msg_row
replace with
utf8_encode(Format:($msg_row)
find:
Format:($msg_row
replace with
utf8_encode(Format:($msg_row)
Any further advices are welcome!