I have a PHP script that deals with a wide variety of languages. Unfortunately, whenever I try to use json_encode
, any Unicode output is converted to hexadecimal entities. Is this the expected behavior? Is there any way to convert the output to UTF-8 characters?
Here's an example of what I'm seeing:
INPUT
echo $text;
OUTPUT
База данни грешка.
INPUT
json_encode($text);
OUTPUT
"u0411u0430u0437u0430 u0434u0430u043du043du0438 u0433u0440u0435u0448u043au0430."
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…