Index: branches/5.2.x/core/kernel/application.php =================================================================== diff -u -N -r15433 -r15445 --- branches/5.2.x/core/kernel/application.php (.../application.php) (revision 15433) +++ branches/5.2.x/core/kernel/application.php (.../application.php) (revision 15445) @@ -1,6 +1,6 @@ isAdmin = kUtil::constOn('ADMIN'); if ( !kUtil::constOn('SKIP_OUT_COMPRESSION') ) { @@ -396,14 +401,6 @@ $this->SetVar('visits_id', $visit_id); } - $language = $this->recallObject('lang.current', null, Array ('live_table' => true)); - /* @var $language LanguagesItem */ - - if ( preg_match('/utf-8/', $language->GetDBField('Charset')) ) { - setlocale(LC_ALL, 'en_US.UTF-8'); - mb_internal_encoding('UTF-8'); - } - if ( defined('DEBUG_MODE') && $this->isDebugMode() ) { $this->Debugger->profileFinish('kernel4_startup'); } @@ -3041,12 +3038,9 @@ */ public function XMLHeader($xml_version = false) { - $lang = $this->recallObject('lang.current'); - /* @var $lang LanguagesItem */ - $this->setContentType('text/xml'); - return $xml_version ? 'GetDBField('Charset') . '"?>' : ''; + return $xml_version ? '' : ''; } /** @@ -3183,26 +3177,23 @@ */ public function setContentType($content_type = 'text/html', $include_charset = null) { - static $aleady_set = false; + static $already_set = false; - if ( $aleady_set ) { + if ( $already_set ) { return; } $header = 'Content-type: ' . $content_type; if ( !isset($include_charset) ) { - $include_charset = $content_type = 'text/html' || $content_type = 'text/xml'; + $include_charset = $content_type = 'text/html' || $content_type == 'text/plain' || $content_type = 'text/xml'; } if ( $include_charset ) { - $language = $this->recallObject('lang.current'); - /* @var $language LanguagesItem */ - - $header .= '; charset=' . $language->GetDBField('Charset'); + $header .= '; charset=' . CHARSET; } - $aleady_set = true; + $already_set = true; header($header); } } \ No newline at end of file