Validate that the provided string is valid UTF8.
If not, replace all invalid bytes with unicode replacement character (U+FFFD).
This method is a verbatim copy of glib's internal _g_utf8_make_valid() function, and will be deprecated as soon as the glib one becomes public.
name |
string to coerce into UTF8 |
a new valid UTF8 string |