Skip to content

Commit f9cae6c

Browse files
DHagerweaverryan
authored andcommitted
Change MySQL UTF-8 examples to use utf8mb4, which is closer to the standard most people would expect
1 parent bcd62ae commit f9cae6c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

book/doctrine.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,21 @@ for you:
134134
There's no way to configure these defaults inside Doctrine, as it tries to be
135135
as agnostic as possible in terms of environment configuration. One way to solve
136136
this problem is to configure server-level defaults.
137+
138+
.. caution::
139+
140+
If you are using MySQL, its `utf8` character set has some shortcomings
141+
which may cause problems. Prefer the `utf8mb4` character set instead, if
142+
your version supports it.
137143

138144
Setting UTF8 defaults for MySQL is as simple as adding a few lines to
139145
your configuration file (typically ``my.cnf``):
140146

141147
.. code-block:: ini
142148
143149
[mysqld]
144-
collation-server = utf8_general_ci
145-
character-set-server = utf8
150+
collation-server = utf8mb4_general_ci
151+
character-set-server = utf8mb4
146152
147153
.. note::
148154

0 commit comments

Comments
 (0)