Also set mb_regex_encoding.

This fixes issues with corrupt bytes when you change the default
encoding and use regular expressions.

Fixes #3800
This commit is contained in:
mark_story 2013-04-30 12:51:49 -04:00
parent 9b7cd0286f
commit b41051c8ab

View file

@ -174,6 +174,9 @@ if (function_exists('mb_internal_encoding')) {
if (!empty($encoding)) {
mb_internal_encoding($encoding);
}
if (!empty($encoding) && function_exists('mb_regex_encoding')) {
mb_regex_encoding($encoding);
}
}
if (!function_exists('mb_stripos')) {