Set Charset
Table of Contents
Note: This function is applicable to all Zoho services. In Zoho Creator, this function can be applied only on files fetched using the invokeUrl task and not on the files fetched from Zoho Creator fields.
Overview
The setCharset task is used to set a Charset to a file object. The file will be encoded with the specified Charset while sending in a HTTP request using invoke URL task.
Syntax
<file_variable>.setCharSet(<charset>);
where:
Example
The following example sets the Charset - UTF-16 to the file fetched from the web:
response = invokeUrl [ url: "http://www.africau.edu/images/default/sample.pdf" type: GET ];
response.setCharSet("UTF-16");
where:
response
The FILE for which the Charset needs to be specified.
"UTF-16"
The TEXT that represents the Charset.