Changeset 147 in subversion for trunk/roundcubemail/program/include/main.inc
- Timestamp:
- Feb 20, 2006 6:29:14 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/main.inc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r140 r147 309 309 $OUTPUT->include_script('program/js/app.js'); 310 310 311 // set locale setting 312 rcmail_set_locale($sess_user_lang); 313 311 314 // set user-selected charset 312 315 if (!empty($CONFIG['charset'])) 313 316 $OUTPUT->set_charset($CONFIG['charset']); 314 else315 rcmail_set_locale($sess_user_lang);316 317 317 318 // add some basic label to client … … 352 353 if ($MBSTRING && function_exists("mb_language")) 353 354 { 354 if (! mb_language(strtok($lang, "_")))355 if (!@mb_language(strtok($lang, "_"))) 355 356 $MBSTRING = FALSE; // unsupport language 356 357 } … … 663 664 function rcube_remote_response($js_code, $flush=FALSE) 664 665 { 666 global $OUTPUT, $CHARSET; 665 667 static $s_header_sent = FALSE; 666 668 … … 674 676 675 677 // send response code 676 print rcube_charset_convert($js_code, 'UTF-8', $GLOBALS['CHARSET']);678 print rcube_charset_convert($js_code, $CHARSET, $OUTPUT->get_charset()); 677 679 678 680 if ($flush) // flush the output buffer … … 889 891 // encode for javascript use 890 892 if ($enctype=='js') 893 { 894 if ($OUTPUT->get_charset()!='UTF-8') 895 $str = rcube_charset_convert($str, $GLOBALS['CHARSET'], $OUTPUT->get_charset()); 896 891 897 return preg_replace(array("/\r\n/", '/"/', "/([^\\\])'/"), array('\n', '\"', "$1\'"), strtr($str, $js_rep_table)); 898 } 892 899 893 900 // encode for RTF … … 1544 1551 function rcmail_charset_selector($attrib) 1545 1552 { 1553 global $OUTPUT; 1554 1546 1555 // pass the following attributes to the form class 1547 1556 $field_attrib = array('name' => '_charset'); … … 1572 1581 $select->add(array_values($charsets), array_keys($charsets)); 1573 1582 1574 $set = $_POST['_charset'] ? $_POST['_charset'] : $ GLOBALS['CHARSET'];1583 $set = $_POST['_charset'] ? $_POST['_charset'] : $OUTPUT->get_charset(); 1575 1584 return $select->show($set); 1576 1585 }
Note: See TracChangeset
for help on using the changeset viewer.
