TidyAll expects octets, not a UTF8 string

This encodes the string before returning it to TidyAll.