Setting charset to utf8mb4 in the config file

Notice: This thread is very old.
netteman
Member | 126
+
+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’

David Matějka
Moderator | 6445
+
0
-

try add charset under options section

database:
	dsn: ....
	options:
		charset: utf8mb4
netteman
Member | 126
+
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)