Oh... looks like you right.
So it finaly a roundcube problem. Should I wright a feature request ?
or maybe try to look at Squirelmail sources and port it to roundcube...
You may try the following patch for today SVN:
diff -urN roundcubemail/program/include/rcube_imap.inc mail/program/include/rcube_imap.inc
--- roundcubemail/program/include/rcube_imap.inc 2006-07-20 16:06:39.000000000 +0700
+++ mail/program/include/rcube_imap.inc 2006-07-27 13:39:09.000000000 +0700
@@ -61,6 +61,7 @@
var $capabilities = array();
var $skip_deleted = FALSE;
var $debug_level = 1;
+ var $charset = '';
/**
@@ -84,6 +85,9 @@
$this->__construct($db_conn);
}
+ function scharset($chars) {
+ $this->charset = $chars;
+ }
/**
* Connect to an IMAP server
@@ -1737,7 +1740,7 @@
}
// no encoding information, defaults to what is specified in the class header
- return rcube_charset_convert($input, 'ISO-8859-1');
+ return rcube_charset_convert($input, $this->charset);
}
diff -urN roundcubemail/program/steps/mail/func.inc mail/program/steps/mail/func.inc
--- roundcubemail/program/steps/mail/func.inc 2006-07-27 12:51:13.000000000 +0700
+++ mail/program/steps/mail/func.inc 2006-07-27 13:37:55.000000000 +0700
@@ -434,6 +434,7 @@
// format each col
foreach ($a_show_cols as $col)
{
+ $IMAP->scharset($header->charset);
if ($col=='from' || $col=='to')
$cont = rep_specialchars_output(rcmail_address_string($header->$col, 3, $attrib['addicon']));
else if ($col=='subject')
@@ -1017,6 +1018,7 @@
if (!$headers[$hkey])
continue;
+ $IMAP->scharset($headers['charset']);
if ($hkey=='date' && !empty($headers[$hkey]))
$header_value = format_date(strtotime($headers[$hkey]));
else if (in_array($hkey, array('from', 'to', 'cc', 'bcc', 'reply-to')))