1
s.encode("utf-16BE", "utf-8", invalid: :replace, undef: :replace).encode("utf-8", "utf-16BE").delete("\uFFFD")