S
S
Sergey Beloventsev2018-03-23 13:43:50
Yii
Sergey Beloventsev, 2018-03-23 13:43:50

How to use google emoji in yii2?

Configured mysql to work with google emoji this article describes how. Now the question remains how to add them for use (saving to the database and output) in Yii2, such an error occurs
General error: 1366 Incorrect string value: '\xF0\x9F\x91\x95 \xF0...' for column 'value' at row one

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
voinmerk, 2019-04-24
@voinmerk

Bro, all tables and fields, as well as the database itself - put down utf8mb4 and utf8mb4_general_ci. The error will not be thrown. Next, follow the database connection config, look for the key in the "charset" array and write there (where the value is) "utf8mb4"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question