Emojis not supported by default MySQL encoding

Description

If an attempt is made to insert an emoji into a text field and then save it, MySQL will throw an exception.
To reproduce:
1. create a patient Note
2. insert an emoji 🙏
3. click OK

The save will fail, with a stack like that below. This is because the the database default character set is utf8 and table collation is utf8_general_ci. To store emojis, it needs to be utf8mb4 and utf8mb4_bin respectively.

See https://stackoverflow.com/questions/30074492/what-is-the-difference-between-utf8mb4-and-utf8-charsets-in-mysql

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Affects versions

Priority

Minor
Configure