Hi Strapier,
I created content type named Contact with attribute firstname. And I got an issue:
Case 1:
await strapi.query(‘Contact’).update({
where: {id: 1},
data: {firstname: ‘Trúc’}
});
==> invalid byte sequence for encoding “UTF8”
Case 2:
await strapi.db.connection.raw(UPDATE Contact SET firstname = 'Trúc' WHERE id = '1'
);
=> It works fine.
System Information
- Strapi Version: 4.25.8
- Operating System: Ubuntu 22.02
- Database: PostgreSQL
- Node Version: 20.13.1
- NPM Version: 10.8.0
- Yarn Version: N/A