Assume ISO-8859-1 encoding of mail messages by default (Patch #1483839)

release-0.6
thomascube 19 years ago
parent 9606ffb322
commit fb5f4f31cf

@ -50,6 +50,7 @@ class rcube_imap
var $page_size = 10; var $page_size = 10;
var $sort_field = 'date'; var $sort_field = 'date';
var $sort_order = 'DESC'; var $sort_order = 'DESC';
var $default_charset = 'ISO-8859-1';
var $delimiter = NULL; var $delimiter = NULL;
var $caching_enabled = FALSE; var $caching_enabled = FALSE;
var $default_folders = array('inbox', 'drafts', 'sent', 'junk', 'trash'); var $default_folders = array('inbox', 'drafts', 'sent', 'junk', 'trash');
@ -1716,8 +1717,9 @@ class rcube_imap
return $out; return $out;
} }
else
return $input; // no encoding information, defaults to what is specified in the class header
return rcube_charset_convert($input, $this->default_charset);
} }
@ -1793,7 +1795,8 @@ class rcube_imap
if (is_array($ctype_param) && !empty($ctype_param['charset'])) if (is_array($ctype_param) && !empty($ctype_param['charset']))
return rcube_charset_convert($body, $ctype_param['charset']); return rcube_charset_convert($body, $ctype_param['charset']);
return $body; // defaults to what is specified in the class header
return rcube_charset_convert($body, $this->default_charset);
} }

Loading…
Cancel
Save