Choose where you’d like to start

Set Charset

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:

ParamsData typeDescription

<file_variable>

FILE

specifies the file object to which the charset will be set.
Note: The file can be fetched from the cloud using the invokeUrl task.

<charset>

TEXT

The Charset that needs to be set to the file.
Allowed values: Click here to find the list of supported Charsets.

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.

Related Links

Get Started Now

Execute