$char_string = decode("utf8", $utf8_bytes); binmode FH, ":encoding(euc-jp)"; print FH $char_string;