From ba4b62981614cb329864b198380adb82e3875338 Mon Sep 17 00:00:00 2001 From: Garvin Hicking Date: Fri, 25 May 2012 10:14:47 +0200 Subject: [PATCH] ISO-8859-1 fallback patch so that my blog works ;) --- docs/NEWS | 3 +++ include/functions_smarty.inc.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/docs/NEWS b/docs/NEWS index 4cfffede..df4f2540 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -4,6 +4,9 @@ Version 1.7 () ------------------------------------------------------------------------ + * For Blogs running on a non-UTF-8 language, set a Smarty constant + to indicate the actually used charset. + * Added to use MyISAM handler for s9y tables (we do not use InnoDB features, but rely on MyISAM fulltext) diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index bcf3452d..9eb531db 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -873,8 +873,13 @@ function serendipity_smarty_init($vars = array()) { $prev_smarty = $_SESSION['no_smarty']; $_SESSION['no_smarty'] = true; + if (LANG_CHARSET != 'UTF-8') { + @define('SMARTY_RESOURCE_CHAR_SET', LANG_CHARSET); + } + // Default Smarty Engine will be used @define('SMARTY_DIR', S9Y_PEAR_PATH . 'Smarty/libs/'); + if (!class_exists('Smarty')) { include SMARTY_DIR . 'Smarty.class.php'; }