Answer the question
In order to leave comments, you need to log in
PHP json_decode cyrillic problem?
Good afternoon, there was a problem with the fact that when contacting the server, the ANSWER from it comes in json format and among them there may be Russian letters, as a result of which the standard json_decode function does not work, is it possible to fix this somehow? google didn't come up with anything clear.
Answer the question
In order to leave comments, you need to log in
<?php
$data_json = utf8_encode($data_json);
$results = json_decode($data_json);
encode Cyrillic with \uABCD; escape sequences. In general, php itself should do this, check the options for one thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question