Set the encoding of the output string to UTF_8_MAC earlier in tidy_bytes