My framework for each pages does the follow:
ini_set(\'mbstring.internal_encoding\',\'UTF-8\');
ini_set(\'mbstring.func_overload\',7);
header(\'Content-Type:
When it comes to the http-header, you're OK as the other answers explain.
But: There are some functions that are default charset aware
From the description of FILTER_SANITIZE_FULL_SPECIAL_CHARS:
Like htmlspecialchars, this filter is aware of the default_charset and if a sequence of bytes is detected that makes up an invalid character in the current character set then the entire string is rejected resulting in a 0-length string.