Testing only one character of first alphabet of kannada ಅ. function htmlentities is not returning &# 3205
Here is my complete code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>UTF8 to HTML Entity</title>
</head>
<body>
<?php
$str = '&# 3205;'; // remove space in between
$str1 = 'ಅ';
echo "Html Entity Decode"."<br>"; // this part working as it returns unicode character
$quotes = html_entity_decode($str, ENT_QUOTES);
$noquotes = html_entity_decode($str, ENT_NOQUOTES);
$noquotesutf8 = html_entity_decode($str, ENT_NOQUOTES, 'UTF-8');
echo "quotes=$quotes, noquotes=$noquotes, noquotesutf8=$noquotesutf8"."<br>";
echo "Html Entities"."<br>"; // this part is not working as it not returning equivalent emtity code &# 3205
$quotes = htmlentities($str1, ENT_QUOTES);
$noquotes = htmlentities($str1, ENT_NOQUOTES);
$noquotesutf8 = htmlentities($str1, ENT_NOQUOTES, 'UTF-8');
$noquotesall = htmlentities($str1, ENT_QUOTES, 'UTF-8');
echo "quotes='$quotes', noquotes='$noquotes', noquotesutf8='$noquotesutf8',noquotesall='$noquotesall'\n";
?>
</body>
</html>