I make captcha in Cyrillic from ttf fonts. php development language I set an array of Latin and (or) numbers - it works. I set an array of Cyrillic - krakozyabry. What could be the error?

function vam_random_charcode($length) { $arraysize = 33; $chars = array('1','2','3','4','5','6','7','8','9','А','Б','В','Г','Д','Е','Ж','И','Й','К','Л','М','Н','П','Р','С','Т','У','Ф','Х','Ц','Ч','Ы','Э','Ю','Я'); $code = ''; for ($i = 1; $i <= $length; $i++) { $j = floor(vam_rand(0,$arraysize)); $code .= $chars[$j]; } return $code; } 
  • is that fonts without cyrillic? - KoVadim
  • A font, for example, the standard Arial.ttf, that is, Cyrillic is in it - KoVaLsKy
  • @ kovalsky2010, page encoding? - Deonis
  • @Deonis UTF-8 in .htaccess AddDefaultCharset utf-8 is registered and the page coding is unlikely, since the picture is generated - KoVaLsKy
  • one
    @ kovalsky2010, lately, this is the most amazing thing I can see;) [iconv ()] [1] introduced since PHP4. Do you want to say that your version is older? )) [1]: ua2.php.net/manual/ru/function.iconv.php - Deonis

0