S
S
Sergey Blokhin2017-02-13 18:03:52
MySQL
Sergey Blokhin, 2017-02-13 18:03:52

How to escape unicode in SQL query?

There is MySQL DBMS. The text field contains the following value:

{"error_message":"\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d"}

Is there a built-in function in MySQL that, as a result of a query, will unpack the given string into "human-readable" text?
Similar to echo -e in bash:
$ echo -e '{"error_message":"\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u0440\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d"}'
> {"error_message":"Указанный транспорт не найден"}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question