This is my problem. If I write letter č or ć in textarea, and then if I use php to check if there in textarea is letter č or ć, it doesn't work, here's code:

	$array=array("&#x010D"); //& # x 010D iz unicode for č, i also tried ascii, and I also tried č
		echo "ok";
	if($tekst==$var) echo "yes";
<form method="post" action="">
	<textarea name="tekst"></textarea>
	<input type="submit" name="sub">

Well, get_html_translation_table(HTML_ENTITIES) doesn't work, I used their example, but nothing, I'm getting è (& egrave) when I use this:

echo $en;

and Ä (& Auml) when I'm using this:

	echo $en;

htmlspecialchars works, but it writes č (in source code of page), not & # 269;, so it doesn't work

PHP is notoriously bad with UTF-8 characters. The only reasonable way I think you would accomplish this would be using the multi-byte functions. http://www.php.net/manual/en/ref.mbstring.php

$str = č;
if( mb_strpos( $_POST['tekst'], $str ) !== FALSE ) {
  echo 'Found String';
} else {
  echo 'No String';

I haven't tested this, but it should handle multi-byte characters better than the standard functions, however you don't have anywhere near the variety of functions to work with.

No, it doesn't work. (No string)

It shoud be the same way as the google translation, if they're using textbox.

And finally, I found a solution on php.net page, ord function. So, here it is:

function ascii($text){
	return $code;
	$tekst2="&# 269;";
	if($tekst2==$tekst) echo "yes"; //output is yes, so it works