diff --git a/cli-script.php b/cli-script.php index 7969a880c..a65baaa90 100755 --- a/cli-script.php +++ b/cli-script.php @@ -61,12 +61,6 @@ if(isset($_SERVER['argv'][1])) { */ require_once("core/Core.php"); -if(function_exists('mb_http_output')) { - mb_http_output('UTF-8'); - mb_internal_encoding('UTF-8'); - mb_regex_encoding('UTF-8'); -} - global $databaseConfig; // We don't have a session in cli-script, but this prevents errors diff --git a/core/Core.php b/core/Core.php index bac9704af..c60295dd8 100644 --- a/core/Core.php +++ b/core/Core.php @@ -195,6 +195,15 @@ define('PR_LOW',10); */ increase_memory_limit_to('64M'); +/** + * Set default encoding + */ +if(function_exists('mb_http_output')) { + mb_http_output('UTF-8'); + mb_internal_encoding('UTF-8'); + mb_regex_encoding('UTF-8'); +} + /////////////////////////////////////////////////////////////////////////////// // INCLUDES diff --git a/main.php b/main.php index b99426088..651e8416a 100644 --- a/main.php +++ b/main.php @@ -60,12 +60,6 @@ if(version_compare(phpversion(), 5, '<')) { */ require_once("core/Core.php"); -if (function_exists('mb_http_output')) { - mb_http_output('UTF-8'); - mb_internal_encoding('UTF-8'); - mb_regex_encoding('UTF-8'); -} - Session::start(); // IIS will sometimes generate this.