Sanitize DB inputs to UTF-8 strings