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:
![](../__attachments/6291465/Capture%20d'%C3%A9cran%202023-06-08%20113903.png?inst-v=1a90f070-fe26-41dc-931e-98c768b55d69)
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 | ![]() XML 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:
![](../__attachments/6291465/Capture%20d'%C3%A9cran%202023-06-08%20125927.png?inst-v=1a90f070-fe26-41dc-931e-98c768b55d69)
Sequence Character set
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";
}
}