# Mail archive not displaying special characters

### Issue

In the mail archive or the view it online link we display the mail that was sent with all the dynamic content frozen when the email is sent.

To do it we have created a new table acym\_mail\_archive in which we save the content of the email.

On some servers, the default collation and charset of the table might be wrong even if we add it in the table creation.

The charset (character set) should be utf8 and the collation should be utf8\_general\_ci

{% tabs %}
{% tab title="With PhpMyAdmin" %}
Connect to your PhpMyAdmin and search the table `acym_mail_archive`.

Then go to the **Operation** tab on the top and select `utf8_general_ci` and don't forget to check the option **Change all column collations** to apply the modification to all columns of the table.

<figure><img src="https://963725040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_D4iy53WFAtKVs3BPA-3566562695%2Fuploads%2FpqetWWSAhLR8Hsni5dMu%2Fchange_collation_pma.png?alt=media&#x26;token=21811457-d4fa-4bc5-b9a6-4b9778a32fd0" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="With MySQL Workbench" %}
Connect to your server with MySQL Workbench and search for the table `acym_maim_archive`.

Once you've found it click on the spanner icon to configure the table.

<figure><img src="https://963725040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_D4iy53WFAtKVs3BPA-3566562695%2Fuploads%2FfkKqzb1iVJyLpUNBcHbY%2FScreenshot%202023-08-02%20at%2014.51.20.png?alt=media&#x26;token=cace2ed8-322a-4bf8-8420-1f473a154e09" alt=""><figcaption></figcaption></figure>

On the configuration page, you have to click on the double arrow icon in the top right corner to display the collation option.\
Once you've displayed it you can change the **Collation** to `utf8` in the first select and then `utf8_general_ci` in the second select.

You can now click on the apply button on the bottom right corner.

<figure><img src="https://963725040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_D4iy53WFAtKVs3BPA-3566562695%2Fuploads%2F9u43ntERzXXhMalBhLPc%2Fmw_change_collation.png?alt=media&#x26;token=07b35566-2de8-4df4-b80a-89f2d491c08a" alt=""><figcaption></figcaption></figure>

Once this is done you have to verify every column (body, subject, settings, stylesheet, attachments) to the right collation if the new default one is not set.

To do it, on the same configuration page, click on every column mentioned below and change its **collation** settings to default.

* body
* subject
* settings
* stylesheet
* attachments

Once it's done you can click on the apply button

<figure><img src="https://963725040-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_D4iy53WFAtKVs3BPA-3566562695%2Fuploads%2FH8BV4FQVKHnGLm6dWb5Y%2Fmw_collation_column.png?alt=media&#x26;token=8ddb68aa-3d76-47a7-9ad7-b16c99e6f460" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

Once the collation is fixed on your table, you can run the following SQL query to clear the existing archive and force AcyMailing to re-generate it:

```sql
// Replace the "xxxx_" by the real table prefix or your database
DELETE FROM XXXX_acym_mail_archive WHERE 1 = 1
```
