Supporting utf8 characters in a utf8 mysql table
Submitted by Ritikesh (@ritikesh) via Zainab Bawa (@zainabbawa) on Wednesday, 13 November 2019
Status: Confirmed & Scheduled
MySQL’s “utf8” encoding only supports three bytes per character. The real UTF-8 encoding needs up to four bytes per character. After upgrading our app’s rails version in production, we started noticing issues in saving objects in the database because of MySQL’s strict mode. We’ll talk about key learnings, the migration itself and best practises for newer apps.
- How we supported storing utf8 content in our app.
- How upgrading the rails version caused MySQL to run in strict mode causing the problems.
- How we evaluated our options and chose the final solution.
- The actual migration and dealing with ad-hoc issues.
Lead Software Engineer @ Freshworks.