Fix server error for non-ASCII characters in query parameters