Ensure the given query is UTF-8 encoded before request the API