$output = "ALLWILLBEASCII";
foreach ($output as $name => $value) {
echo mb_detect_encoding( $value );
}
如何在 PHP 中将 ASCII 转换为 UTF-8?
最佳答案
如果字符是有效的 ASCII,那么它也是有效的 UTF-8,无需转换。 http://en.wikipedia.org/wiki/UTF-8
关于php - mb_detect_encoding 曾经是 ASCII,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4248764/