I am using PHP 5.2.6 and my app's character set is UTF-8.
Now, how should I change PHP's default character set? NOT the one which specifies output's mime time and character set.
But which will change for all the PHP function like htmlspecialchars, htmlentities, etc.
I know, there is a parameter in those functions which takes the character set of the input string. But I don't want to specify for all the functions I use. And if somewhere I forget, it will be mess.
I also know, that I can wrap those functions and create my own wrapper like:
function myHtmlize($str)
{
return htmlspecialchars($str, ENT_COMPAT, 'UTF-8');
}
I also, don't like this solution.
I really want to tell PHP, that by default take 'UTF-8' as the character set. Not 'iso-8859-1'.
Is it possible?