diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 72349ad9..078986ea 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -683,6 +683,14 @@ class Smarty extends Smarty_Internal_TemplateBase if (isset($_SERVER['SCRIPT_NAME'])) { $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']); } + + // Check if we're running on windows + Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; + + // let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 + if (Smarty::$_CHARSET !== 'UTF-8') { + Smarty::$_UTF8_MODIFIER = ''; + } } /** @@ -1586,14 +1594,6 @@ class Smarty extends Smarty_Internal_TemplateBase } } -// Check if we're running on windows -Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'; - -// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8 -if (Smarty::$_CHARSET !== 'UTF-8') { - Smarty::$_UTF8_MODIFIER = ''; -} - /** * Autoloader