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