> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set UTF-8 encoding

> Set encoding for the request to UTF-8 based on the 'from encoding' with a user selected error option.

Set encoding for the request to UTF-8 based on the 'from encoding' with a user selected error option. Add this to a connection when the other system sends back text in a character encoding other than UTF-8, which can leave accented letters or special symbols looking garbled. This plugin converts the response from the encoding you name into UTF-8 so the rest of your integration reads clean, consistent text. You also choose what should happen to any characters that cannot be converted: stop with an error, replace them with a close approximation, or simply drop them.

This documentation describes: [Schema](/schemas/http-client-plugin-configurator/set-encoding-utf-8)

## Fields

**Original encoding**

Optional

The encoding the incoming text is currently in, for example `ISO-8859-1` or `Windows-1252`. This is the encoding the plugin converts from. Leave it empty to assume the text is already UTF-8.

**Invalid characters**

Required

How to handle characters that cannot be converted to UTF-8. Choose one of:

* **Trigger an error** stops and fails the request when an invalid character is found.
* **Approximate characters** replaces each one with the closest UTF-8 equivalent.
* **Ignore invalid characters** drops them from the text.

Defaults to *Ignore invalid characters*.

## Sample data

This plugin converts the response body from the encoding you name into UTF-8. The text itself is unchanged; only its encoding is corrected, so characters that were previously garbled display correctly.

For example, when the other system returns text encoded as Windows-1252 and you want any characters that do not map cleanly to be approximated rather than dropped:

| Field | Value |
| - | - |
| Original encoding | `Windows-1252` |
| Invalid characters | Approximate characters |

```json Configuration theme={null}
{
  "prototype": "set-encoding-utf-8",
  "parameters": {
    "fromEncoding": "Windows-1252",
    "onError": "TRANSLIT"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.