diff options
| author | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-11-14 23:55:46 +0000 |
|---|---|---|
| committer | roundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2005-11-14 23:55:46 +0000 |
| commit | 8c3b64d00defbba89f38686297e4e9f43e39fd56 (patch) | |
| tree | 3c688e3e8630d35d52de4f9c85e8d469fb485888 /roundcubemail/program/include/rcube_shared.inc | |
| parent | 48668271f1df53195fef4259cc3c5b2a851c820e (diff) | |
SMTPS support and minor bugfixes
git-svn-id: https://svn.roundcube.net/trunk@83 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
| -rw-r--r-- | roundcubemail/program/include/rcube_shared.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc index edf19b66e..9b1b23bf6 100644 --- a/roundcubemail/program/include/rcube_shared.inc +++ b/roundcubemail/program/include/rcube_shared.inc @@ -1146,6 +1146,8 @@ EOF; // perform utf-8 decoding if ($utf8_decode && function_exists('utf8ToUnicodeEntities')) $text = utf8ToUnicodeEntities($text); + else if ($utf8_decode) + $OUTPUT->set_charset('UTF-8'); // format output @@ -1206,7 +1208,7 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) { if (!$html_encode_arr) { - $html_encode_arr = get_html_translation_table(HTML_ENTITIES); // HTML_SPECIALCHARS + $html_encode_arr = get_html_translation_table(HTML_SPECIALCHARS); // HTML_ENTITIES $html_encode_arr[chr(128)] = '€'; unset($html_encode_arr['?']); unset($html_encode_arr['&']); @@ -1238,10 +1240,12 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) // if the replace tables for RTF, XML and JS are not yet defined if (!$js_rep_table) { + $js_rep_table = $rtf_rep_table = $xml_rep_table = array(); + for ($c=160; $c<256; $c++) // can be increased to support more charsets { $hex = dechex($c); - $js_rep_table[Chr($c)] = sprintf("\u%s%s", str_repeat('0', 4-strlen($hex)), $hex); + //$js_rep_table[Chr($c)] = sprintf("\u%s%s", str_repeat('0', 4-strlen($hex)), $hex); $rtf_rep_table[Chr($c)] = "\\'$hex"; $xml_rep_table[Chr($c)] = "&#$c;"; } |
