$str = mb_convert_encoding($str, "UTF-8", "auto");
これいらんのじゃ