Handle non-printable characters is rules_as_string method