Can someone explain why the output ASCIIin the last three tests is lower?
I get the same results on my own system, PHPTester.net , and PhpFiddle.org .
echo mb_internal_encoding();
$str = 'foobar';
echo mb_check_encoding($str, 'UTF-8');
echo mb_detect_encoding($str);
$encoded = utf8_encode($str);
echo mb_detect_encoding($encoded);
$converted = mb_convert_encoding($str, 'UTF-8');
echo mb_detect_encoding($converted);
source
share