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