* baseControl: don't encode multi-byte unicode character.

This commit is contained in:
liugang
2024-05-24 16:18:08 +08:00
committed by caoyanyi
parent 902a83794f
commit 1283792666
+2 -2
View File
@@ -1102,7 +1102,7 @@ class baseControl
{
if(defined('RUN_MODE') && in_array(RUN_MODE, array('api', 'xuanxuan')))
{
print(json_encode($data));
print(json_encode($data, JSON_UNESCAPED_UNICODE));
$response = helper::removeUTF8Bom(ob_get_clean());
return print($response);
}
@@ -1111,7 +1111,7 @@ class baseControl
// $obLevel = ob_get_level();
// for($i = 0; $i < $obLevel; $i++) ob_end_clean();
$response = helper::removeUTF8Bom(json_encode($data));
$response = helper::removeUTF8Bom(json_encode($data, JSON_UNESCAPED_UNICODE));
$this->app->outputXhprof();
return helper::end($response);
}