Until now we set the character set encoding of the database connection with the query SET NAMES utf8mb4. As the manual page of the function mysqli_set_names states, is the use of the function preferred over the use of the above mentioned query for this purpose because the function changes more than only the charset of the connection itself.
But the function does not set a collation for the connection (defines the sorting of ordered query results). When the collation is not explicitely set to a defined value, the default value configured on the specific server is used instead.
This is described inafew of the user comments on the bottom of the manual page for the function mysqli_set_charset wich also provide a method to solve the problem. To unify this, we have keep the query and have to enhance it with setting a specific collation.
The selected collation might be replaced later if and when we encounter a problem with the sorting of results.
Until now we set the character set encoding of the database connection with the query
SET NAMES utf8mb4
. As the manual page of the functionmysqli_set_names
states, is the use of the function preferred over the use of the above mentioned query for this purpose because the function changes more than only the charset of the connection itself.But the function does not set a collation for the connection (defines the sorting of ordered query results). When the collation is not explicitely set to a defined value, the default value configured on the specific server is used instead.
This is described in a few of the user comments on the bottom of the manual page for the function
mysqli_set_charset
wich also provide a method to solve the problem. To unify this, we have keep the query and have to enhance it with setting a specific collation.The selected collation might be replaced later if and when we encounter a problem with the sorting of results.
See also #693