10000 Change MySQL UTF-8 examples to use utf8mb4 by DHager · Pull Request #5100 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Change MySQL UTF-8 examples to use utf8mb4 #5100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
10 changes: 8 additions & 2 deletions book/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ for you:
.. code-block:: ini

[mysqld]
collation-server = utf8_general_ci
character-set-server = utf8
# Version 5.5.3 introduced "utf8mb4", which is recommended
collation-server = utf8mb4_general_ci # Replaces utf8_general_ci
character-set-server = utf8mb4 # Replaces utf8

We recommend against MySQL's ``utf8`` character set, since it does not
support 4-byte unicode characters, and strings containing them will be
truncated. This is fixed by the `newer utf8mb4 character set`_.

.. note::

Expand Down Expand Up @@ -1419,3 +1424,4 @@ For more information about Doctrine, see the *Doctrine* section of the
.. _`migrations`: http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html
.. _`DoctrineFixturesBundle`: http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html
.. _`FrameworkExtraBundle documentation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html
.. _`newer utf8mb4 character set`: https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
0