$octets = encode("utf8", $string);