O
O
Optimus2016-07-27 15:59:57
PHP
Optimus, 2016-07-27 15:59:57

json encoding?

Why, after json_encode, the text in the database is \u0412\u0435\u0434\u0443\u0449\u0430\u044f, although both the row and the table have utf8_general_ci
The string is varchar type, the mysql database is why JSON type fields are not supported

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Optimus Pian, 2016-07-27
Pyan @marrk2

json_encode($a, JSON_UNESCAPED_UNICODE);

L
Lander, 2016-07-27
@usdglander

Well, this is how json_encode transforms the data. What's the problem?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question