strange problem occurs with json_encode(). I have some text in mysql database in russian. The text fields in DB are encoded in utf8-general-ci. when executingecho json_encode($this->result); all the text that is in russian becomes “null”
Any ideas? Thank you in advance
When
json_encode()encounters a string that contains an invalid (= non-UTF-8) character, it drops the entire string silently.Most likely your database connection is not UTF-8 encoded. See this question on how to fix that.