Encode arguments to API as UTF8