summaryrefslogtreecommitdiffstats
path: root/tests/mocks/core
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-02-11 21:48:45 +0100
committerAndrey Andreev <narf@devilix.net>2014-02-11 21:48:45 +0100
commitbe1496d1a8618ef186047468009c7e3e0640183b (patch)
tree92bce7844ffa06bcae2626dcbacda11846f2d5b4 /tests/mocks/core
parentf6ead61e8930574b0e7e8cfad6b4878bb169d61a (diff)
Utf8/iconv/mbstring-related changes
Diffstat (limited to 'tests/mocks/core')
-rw-r--r--tests/mocks/core/utf8.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/mocks/core/utf8.php b/tests/mocks/core/utf8.php
index a43138fbc..9dda43aec 100644
--- a/tests/mocks/core/utf8.php
+++ b/tests/mocks/core/utf8.php
@@ -16,11 +16,22 @@ class Mock_Core_Utf8 extends CI_Utf8 {
{
defined('MB_ENABLED') OR define('MB_ENABLED', TRUE);
mb_internal_encoding('UTF-8');
+ ini_set('mbstring.substitute_character', 'none');
}
else
{
defined('MB_ENABLED') OR define('MB_ENABLED', FALSE);
}
+
+ if (extension_loaded('iconv'))
+ {
+ defined('ICONV_ENABLED') OR define('ICONV_ENABLED', TRUE);
+ iconv_set_encoding('internal_encoding', 'UTF-8');
+ }
+ else
+ {
+ defined('ICONV_ENABLED') OR define('ICONV_ENABLED', FALSE);
+ }
}
public function is_ascii_test($str)