friends-of-reactphp / mysql

Async MySQL database client for ReactPHP.
MIT License
331 stars 66 forks source link

Change default charset encoding to `utf8mb4` for full UTF-8 support #165

Closed clue closed 1 year ago

clue commented 1 year ago

This changeset updates the MySQL client to use utf8mb4 as the default charset encoding for full UTF-8 support instead of the legacy utf8mb3 charset encoding that was previously used for BC reasons. The utf8mb4 encoding is available as of MySQL 5.5.3 (released early 2010) and is what most applications would want to use nowadays. For legacy reasons you can still change this to use a different ASCII-compatible charset encoding like this:

$factory->createConnection('localhost?charset=utf8mb4');

Builds on top of #135