Setting charset to utf8mb4 in the config file

2 years ago

netteman
Member | 66
+
+1
-

Hi

nette sets the charset to utf8mb4 using a query – SET NAMES 'utf8mb4. Is it possible to set the charset in the config file so I can get rid of this automatic query?

I tried this, but it didn't work
dsn: ‘mysql:host=127.0.0.1;dbname=test;charset=utf8mb4’

2 years ago

David Matějka
Moderator | 5814
+
0
-

try add charset under options section

database:
    dsn: ....
    options:
        charset: utf8mb4

2 years ago

netteman
Member | 66
+
0
-

Hi,

adding the charset to options doesn't remove the SET NAMES query (on Ubuntu and XAMPP)

(sorry for my late reply, I was ill)

Last edited by netteman (2017-01-22 10:29)