A small program builds a short report from two strings. One string is already in UTF-8, and the second is created from an array of bytes and marked as UTF-8 even though it contains an invalid byte. The code then tries to obtain safe text for output and prints several diagnostic lines.
valid_encoding?,scrub('?'),bytesize and length of the final string.puts prints in the program.report.rb.ruby report.rb
3.3.0ruby report.rbFiber are not usedUTF-8Click a line and write what it prints. Explanation is optional.