$char_string = decode("euc-jp", $jp_bytes); $utf8_bytes = encode("utf8", $char_string);