Skip to content

Commit

Permalink
Also set mb_regex_encoding.
Browse files Browse the repository at this point in the history
This fixes issues with corrupt bytes when you change the default
encoding and use regular expressions.

Fixes #3800
  • Loading branch information
markstory committed Apr 30, 2013
1 parent 9b7cd02 commit b41051c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Cake/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@
if (!empty($encoding)) {
mb_internal_encoding($encoding);
}
if (!empty($encoding) && function_exists('mb_regex_encoding')) {
mb_regex_encoding($encoding);
}
}

if (!function_exists('mb_stripos')) {
Expand Down

0 comments on commit b41051c

Please sign in to comment.