Answer the question
In order to leave comments, you need to log in
MODx, MIGX and Cyrillic?
Good day!
The problem is this: if you enter data in the admin panel in TV with the MIGX type, then the Cyrillic alphabet is entered and displayed normally, but it is written to the database as
"color":"\u0410\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439 \u043e\u0440\u0435\u0445"
instead of human Cyrillic, and this is important, because the customer exports the entire database of goods in .csv and then works with it. Answer the question
In order to leave comments, you need to log in
I asked myself, I answer myself:
in the /core/xpdo/xpdo.class.php file, on line 2365, the toJSON function is declared, which now looks like this:
public function toJSON($array) {
$encoded= '';
if (is_array ($array)) {
// if (!function_exists('json_encode')) {
// if (@ include_once (XPDO_CORE_PATH . 'json/JSON.php')) {
// $json = new Services_JSON();
// $encoded= $json->encode($array);
// }
// } else {
$encoded= json_encode($array, JSON_UNESCAPED_UNICODE);
//}
}
return $encoded;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question