Index: branches/5.2.x/core/install/steps_db.xml =================================================================== diff -u -N -r15380 -r15445 --- branches/5.2.x/core/install/steps_db.xml (.../steps_db.xml) (revision 15380) +++ branches/5.2.x/core/install/steps_db.xml (.../steps_db.xml) (revision 15445) @@ -144,6 +144,10 @@ functionality for CSS / Javascript files. The default value is set to PHP-based if no Java is auto-detected on server-side. Available options are: None (empty), YUICompressor (Java) (yui) and PHP-based (php) .

+

Website Charset - character encoding that will be used across the website. By default this should be set to UTF-8, + but can set to other encoding also (see wikipedia.org options). + It's highly recommended to have Website Encoding match the Database Encoding (specified on DB step).

+
]]> Index: branches/5.2.x/core/admin_templates/browser/browser_header.tpl =================================================================== diff -u -N -r15323 -r15445 --- branches/5.2.x/core/admin_templates/browser/browser_header.tpl (.../browser_header.tpl) (revision 15323) +++ branches/5.2.x/core/admin_templates/browser/browser_header.tpl (.../browser_header.tpl) (revision 15445) @@ -4,7 +4,7 @@ <inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/> - + Index: branches/5.2.x/core/admin_templates/incs/close_popup.tpl =================================================================== diff -u -N -r14895 -r15445 --- branches/5.2.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 14895) +++ branches/5.2.x/core/admin_templates/incs/close_popup.tpl (.../close_popup.tpl) (revision 15445) @@ -1,7 +1,5 @@ - - Index: branches/5.2.x/core/units/helpers/language_import_helper.php =================================================================== diff -u -N -r15436 -r15445 --- branches/5.2.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 15436) +++ branches/5.2.x/core/units/helpers/language_import_helper.php (.../language_import_helper.php) (revision 15445) @@ -1,6 +1,6 @@ (string)$language_node['PackName'], 'LocalName' => (string)$language_node['PackName'], 'Encoding' => (string)$language_node['Encoding'], - 'Charset' => 'utf-8', 'SynchronizationModes' => Language::SYNCHRONIZE_DEFAULT, ); Index: branches/5.2.x/core/kernel/startup.php =================================================================== diff -u -N -r15042 -r15445 --- branches/5.2.x/core/kernel/startup.php (.../startup.php) (revision 15042) +++ branches/5.2.x/core/kernel/startup.php (.../startup.php) (revision 15445) @@ -1,6 +1,6 @@ enclosure_mapping[(int)$this->Application->ConfigValue('CSVExportEnclosure')]; $export_data['record_separator'] = $this->separator_mapping[(int)$this->Application->ConfigValue('CSVExportSeparator')]; $export_data['page'] = 1; - - $lang_object = $this->Application->recallObject('lang.current'); - /* @var $lang_object LanguagesItem */ - - $export_data['source_encoding'] = strtoupper($lang_object->GetDBField('Charset')); + $export_data['source_encoding'] = strtoupper(CHARSET); $export_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE'; $this->Application->StoreVar('export_rand', $get_rand); @@ -185,10 +181,7 @@ if(!file_exists($filename) || !is_file($filename)) return 'cant_open_file'; $import_data = Array(); - - $lang_object = $this->Application->recallObject('lang.current'); - /* @var $lang_object LanguagesItem */ - $import_data['source_encoding'] = strtoupper( $lang_object->GetDBField('Charset') ); + $import_data['source_encoding'] = strtoupper(CHARSET); $import_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE'; $import_data['errors'] = ''; Index: branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl =================================================================== diff -u -N -r14244 -r15445 --- branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl (.../reviews_tab.tpl) (revision 14244) +++ branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl (.../reviews_tab.tpl) (revision 15445) @@ -1,8 +1,7 @@ - - + Index: branches/5.2.x/core/admin_templates/regional/languages_edit.tpl =================================================================== diff -u -N -r15436 -r15445 --- branches/5.2.x/core/admin_templates/regional/languages_edit.tpl (.../languages_edit.tpl) (revision 15436) +++ branches/5.2.x/core/admin_templates/regional/languages_edit.tpl (.../languages_edit.tpl) (revision 15445) @@ -61,7 +61,6 @@ - Index: branches/5.2.x/core/units/fck/fck_eh.php =================================================================== diff -u -N -r15173 -r15445 --- branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 15173) +++ branches/5.2.x/core/units/fck/fck_eh.php (.../fck_eh.php) (revision 15445) @@ -1,6 +1,6 @@ Application->getBaseCategory()] .= '/Index'; // "Content" category will act as "Home Page" - $res = '' . "\n"; + $res = '' . "\n"; $res .= '' . "\n"; foreach ($pages as $id => $title) { @@ -169,7 +169,7 @@ $fck_helper = $this->Application->recallObject('FCKHelper'); /* @var $fck_helper fckFCKHelper */ - $ret = ''."\n" ; + $ret = ''."\n" ; $ret .= ""."\n"; $ret .= $fck_helper->PrintFolders(); $ret .= $fck_helper->PrintFiles(); Index: branches/5.2.x/core/install/english.lang =================================================================== diff -u -N -r15437 -r15445 --- branches/5.2.x/core/install/english.lang (.../english.lang) (revision 15437) +++ branches/5.2.x/core/install/english.lang (.../english.lang) (revision 15445) @@ -1,6 +1,6 @@ - + JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg== Index: branches/5.2.x/core/units/translator/translator_event_handler.php =================================================================== diff -u -N -r15145 -r15445 --- branches/5.2.x/core/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 15145) +++ branches/5.2.x/core/units/translator/translator_event_handler.php (.../translator_event_handler.php) (revision 15445) @@ -1,6 +1,6 @@ Load($current_lang); - $translator->SetDBField('Charset', $cur_lang->GetDBField('Charset')); + $translator->SetDBField('Charset', CHARSET); $event->redirect = false; } Index: branches/5.2.x/core/units/languages/languages_tag_processor.php =================================================================== diff -u -N -r15152 -r15445 --- branches/5.2.x/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 15152) +++ branches/5.2.x/core/units/languages/languages_tag_processor.php (.../languages_tag_processor.php) (revision 15445) @@ -1,6 +1,6 @@ Application->GetVar('phrases_label'); + $content_type = isset($params['content_type']) ? $params['content_type'] : 'text/html'; + $include_charset = isset($params['include_charset']) ? $params['include_charset'] : null; - $top_prefix = $this->Application->GetTopmostPrefix($this->Prefix); - if( substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't' && !$edit_direct ) - { - $object = $this->getObject($params); - /* @var $object kDBItem */ + $this->Application->setContentType($content_type, $include_charset); - return $object->GetDBField('Charset'); - } - - $lang_current = $this->Application->recallObject('lang.current'); - /* @var $lang_current LanguagesItem */ - - return $lang_current->GetDBField('Charset'); + return ''; } /** Index: branches/5.2.x/core/units/categories/categories_event_handler.php =================================================================== diff -u -N -r15427 -r15445 --- branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15427) +++ branches/5.2.x/core/units/categories/categories_event_handler.php (.../categories_event_handler.php) (revision 15445) @@ -1,6 +1,6 @@ _partsToParse = $url_parts; Index: branches/5.2.x/core/units/languages/languages_config.php =================================================================== diff -u -N -r15436 -r15445 --- branches/5.2.x/core/units/languages/languages_config.php (.../languages_config.php) (revision 15436) +++ branches/5.2.x/core/units/languages/languages_config.php (.../languages_config.php) (revision 15445) @@ -1,6 +1,6 @@ Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'g:i A'), 'DecimalPoint' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => '.'), 'ThousandSep' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''), - 'Charset' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => 'utf-8'), 'UnitSystem' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1, @@ -227,6 +226,7 @@ ), 'VirtualFields' => Array ( + 'Charset' => Array ('type' => 'string', 'default' => CHARSET), // for backwards compatibility 'CopyLabels' => Array ('type' => 'int', 'default' => 0), 'CopyFromLanguage' => Array ( 'type' => 'int', @@ -249,7 +249,6 @@ 'PackName' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),// 'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ), 'AdminInterfaceLang' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ), - 'Charset' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ), 'Priority' => Array ('filter_block' => 'grid_like_filter', 'width' => 60, ), 'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ), 'SynchronizationModes' => Array ('filter_block' => 'grid_picker_filter', 'width' => 120, 'format' => ', ', 'hidden' => 1), Index: branches/5.2.x/core/admin_templates/incs/header.tpl =================================================================== diff -u -N -r15323 -r15445 --- branches/5.2.x/core/admin_templates/incs/header.tpl (.../header.tpl) (revision 15323) +++ branches/5.2.x/core/admin_templates/incs/header.tpl (.../header.tpl) (revision 15445) @@ -6,7 +6,7 @@ <inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/> - + 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 Index: branches/5.2.x/core/units/helpers/mime_decode_helper.php =================================================================== diff -u -N -r15137 -r15445 --- branches/5.2.x/core/units/helpers/mime_decode_helper.php (.../mime_decode_helper.php) (revision 15137) +++ branches/5.2.x/core/units/helpers/mime_decode_helper.php (.../mime_decode_helper.php) (revision 15445) @@ -1,6 +1,6 @@ Application->recallObject('lang.current'); - /* @var $language LanguagesItem */ - $to_encoding = $language->GetDBField('Charset'); + if ( $to_encoding === false ) { + $to_encoding = CHARSET; } - return mb_convert_encoding($text, $to_encoding, $from_engoding); + return mb_convert_encoding($text, $to_encoding, $from_encoding); } Index: branches/5.2.x/core/kernel/utility/email_send.php =================================================================== diff -u -N -r15415 -r15445 --- branches/5.2.x/core/kernel/utility/email_send.php (.../email_send.php) (revision 15415) +++ branches/5.2.x/core/kernel/utility/email_send.php (.../email_send.php) (revision 15445) @@ -1,6 +1,6 @@ Application->recallObject('lang.current'); - /* @var $language LanguagesItem */ - - $charset = $language->GetDBField('Charset') ? $language->GetDBField('Charset') : 'ISO-8859-1'; - } - - $this->charset = $charset; + $this->charset = $is_system ? CHARSET : $charset; } /** Index: branches/5.2.x/core/admin_templates/catalog_tab.tpl =================================================================== diff -u -N -r14585 -r15445 --- branches/5.2.x/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 14585) +++ branches/5.2.x/core/admin_templates/catalog_tab.tpl (.../catalog_tab.tpl) (revision 15445) @@ -21,8 +21,7 @@ $Catalog.setItemCount('', ''); - - + Index: branches/5.2.x/core/install/step_templates/sys_config.tpl =================================================================== diff -u -N -r15375 -r15445 --- branches/5.2.x/core/install/step_templates/sys_config.tpl (.../sys_config.tpl) (revision 15375) +++ branches/5.2.x/core/install/step_templates/sys_config.tpl (.../sys_config.tpl) (revision 15445) @@ -10,6 +10,7 @@ 'CacheHandler' => Array ('type' => 'select', 'title' => 'Output Caching Engine', 'section' => 'Misc', 'default' => 'Fake'), 'MemcacheServers' => Array ('type' => 'text', 'title' => 'Location of Memcache Servers', 'section' => 'Misc', 'default' => 'localhost:11211'), 'CompressionEngine' => Array ('type' => 'select', 'title' => 'CSS/JS Compression Engine', 'section' => 'Misc', 'default' => ''), + 'WebsiteCharset' => Array ('type' => 'text', 'title' => 'Website Charset', 'section' => 'Misc', 'required' => 1, 'default' => 'utf-8'), ); $settings['CacheHandler']['options'] = $this->toolkit->getWorkingCacheHandlers(); Index: branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl =================================================================== diff -u -N -r14585 -r15445 --- branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 14585) +++ branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl (.../permissions_tab.tpl) (revision 15445) @@ -3,8 +3,7 @@
_div" prefix="" group_id="-1" class="catalog-tab">
- - + if ($request_visible) { document.getElementById('_div').setAttribute('group_id', ); maximizeElement( jq('#_div') ); Index: branches/5.2.x/core/admin_templates/index.tpl =================================================================== diff -u -N -r14572 -r15445 --- branches/5.2.x/core/admin_templates/index.tpl (.../index.tpl) (revision 14572) +++ branches/5.2.x/core/admin_templates/index.tpl (.../index.tpl) (revision 15445) @@ -6,7 +6,7 @@ - + <inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/>