I'm trying to implement Caesar cipher using PHP, but my scrips's got problem with polish signs. I'm using UTF-8 charset but signs like "ĄŚĆŃ" are displayed like '�' anyway.
Here is my code:
$text='MYCODE'; //code to crypt
$alphabet="AĄBCĆDEĘFGHIJKLŁMNŃOÓPRSŚTUWYZŹŻ";
$n=strlen($text);
$new_text='';
for ($i=0; $i<$n; $i++)
$new_text.=$alphabet[(strpos($alphabet,$text[$i])+5)%32];
echo $new_text;
echo "</br>";
and that's the result of it: '�E�SGH'
When I work with english alphabet it works correctly.