I'm trying to use a multi-byte string replacement function with some Japanese in my script, but it's failing due to one of the strings being compared being stuck in ASCII. The script itself is saved as UTF-8.
$text = iconv('ASCII', 'UTF-8', $text);
//$text = utf8_encode($text);
echo "Encoding: ".mb_detect_encoding($text);
I've tried either of the two methods above, but regardless of which I pick, it still echoes 'Encoding: ASCII'. I'm pretty new to this, so I'm probably missing something here, but is there any obvious reason why both of these might fail?
Thanks!