MYSQL - Accented character encoding


We have a MySQL database connector. A lot of informations are stored with a wrong encoding.
For example, we have :

- In DB : Démo
- Excepted : Démo

- In DB : dépôt
- Expected : dépôt

We have found a temporary fix by adding convert in SQL request like this :

CONVERT(TABLE.FIELD using latin1) as binary
) USING utf8

We can't afford to continue with this fix because this processing would have to be done on every field in our SQL queries.

Hence our request: Is it not possible to add a parameter in the resource to compensate for this? Other ideas?

NB : We can't change encoding in DB because this is on production.

Hi @DSI!

Hmmm. There's no parameter in the resource at the Retool level for this. Do you know if you've been able to use JS to work with your particular encoding before? I wonder if you could just write a JS query that converts an entire query result for you, instead of doing it field by field in SQL.

1 Like


Thanks for yout quick reply.
We will use :

"return decodeURIComponent(escape({{ QUERY_NAME.rawData['FIELD_NAME'] }}));"

Something like that sounds great! Is that working for you? :slight_smile:

Yes thanks ! :slight_smile:

As a quick thought, would setting the charset on the resource configuration page be helpful here?



Since then, we have converted the database from Latin1 to utf8mb4.
But we had tested your connection option and that's not working.