Fix unicode return for data helpers

`generate_string` was updated to return a str type string for utf-8 and latin1 strings. Now we need to decode the returned string when creating `valid_data_list` and `invalid_names_list`.