diff options
author | tiyowan <tiyowan@gmail.com> | 2012-03-12 18:32:08 +0100 |
---|---|---|
committer | tiyowan <tiyowan@gmail.com> | 2012-03-12 18:32:08 +0100 |
commit | 4efd1cf37fb5518ae81369f9066cea9b7246caee (patch) | |
tree | 620bf935c864871c17615f0aca36d5c9247c1269 | |
parent | 3055e1fa227125383fb1fdbb3dd674aaaaf62184 (diff) |
Revert "Remove unused defines from CI_Utf8"
This reverts commit a6fd531e348bd345bbbd06b7c5504090d9bd7ca4.
-rw-r--r-- | system/core/Utf8.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/system/core/Utf8.php b/system/core/Utf8.php index 1d5dfc20d..ba3567453 100644 --- a/system/core/Utf8.php +++ b/system/core/Utf8.php @@ -57,17 +57,26 @@ class CI_Utf8 { && @ini_get('mbstring.func_overload') != 1 // Multibyte string function overloading cannot be enabled && $CFG->item('charset') === 'UTF-8' // Application charset must be UTF-8 ) - { + { + define('UTF8_ENABLED', TRUE); log_message('debug', 'UTF-8 Support Enabled'); // set internal encoding for multibyte string functions if necessary + // and set a flag so we don't have to repeatedly use extension_loaded() + // or function_exists() if (extension_loaded('mbstring')) { + define('MB_ENABLED', TRUE); mb_internal_encoding('UTF-8'); } + else + { + define('MB_ENABLED', FALSE); + } } else { + define('UTF8_ENABLED', FALSE); log_message('debug', 'UTF-8 Support Disabled'); } } |