Convertigo Public Knowledge base

Dealing with Character Set Encoding response

The HTTP connector analyses the headers response to get the Character Set Encoding (Default to UTF-8, if not found).

Sometimes, headers and content data does not match or you want to force encoding.

You can act at different levels depending the use case.

At the Connector level:

Default URL charset encoding

Default URL charset encoding => Defines the default charset encoding to use for the transactions variable values sent as parameters in HTTP requests.

At transaction level:

JSON HTTP transaction

 

Character set => Defines the character set used for operations on the generated JSON/XML document (default: UTF-8).

JSON/XML response encoding => Defines the encoding of the JSON/XML returned by the target server.

URL charset encoding => Defines the charset encoding to use for the variable values sent as parameters in HTTP request.

At Sequence level:

Character set => Defines the character set used for operations on the generated XML document (default: UTF-8).

In some extreme case, you may end up overriding encoding response with the following code in the transaction handlers Editor:

function onDataRetrieved() { if(context.contentType.indexOf("text/html") != -1){ context.contentType = "text/plain;charset=ISO-8859-1"; } }

(c) Convertigo 2023 https://www.convertigo.com