<?php
/*
* arrayToJson
* pear config-get php_dir
* pear install XML_Serializer
??? ????????? UTF-8 ????? ????? ? ????? XML/Util.php:876 ?????????? ??????? isValidName
?????? 879
if (!preg_match('/^[[:alpha:]_]\\z/u', mb_substr($string,0,1))) {
# ???????? ??????????? u ? ????? ??????? ??????? ? UTF mb_substr($string,0,1) ?????? string{0}
?????? 887
$match = preg_match(
'/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
. '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/u',# ???????? ??????????? u
$string
);
To support UTF-8 tags, you need to modify the isValidName function in the XML / Util.php file: 876
line 879
if (!preg_match('/^[[:alpha:]_]\\z/u', mb_substr($string,0,1))) {
# add u modifier and select first character in UTF mb_substr($string,0,1) instead of string{0}
line 887
$match = preg_match(
'/^([[:alpha:]_]([[:alnum:]\-\.]*)?:)?'
. '[[:alpha:]_]([[:alnum:]\_\-\.]+)?\\z/u',# Add u modifier
$string
);
*/
return function($array){
return json_encode($array);
}?>
|