diff --git a/src/Gregwar/Captcha/PhraseBuilder.php b/src/Gregwar/Captcha/PhraseBuilder.php index aa6ecf1..f691774 100644 --- a/src/Gregwar/Captcha/PhraseBuilder.php +++ b/src/Gregwar/Captcha/PhraseBuilder.php @@ -40,7 +40,7 @@ public function build($length = null, $charset = null) } $phrase = ''; - $chars = str_split($this->charset); + $chars = mb_str_split($this->charset); for ($i = 0; $i < $this->length; $i++) { $phrase .= $chars[array_rand($chars)]; @@ -62,7 +62,7 @@ public function niceize($str) */ public static function doNiceize($str) { - return strtr(strtolower($str), '01', 'ol'); + return strtr(mb_strtolower($str), '01', 'ol'); } /**