| @@ 968-975 (lines=8) @@ | ||
| 965 | // we use the broadest one, ie. utf8 |
|
| 966 | // This allows to send data which is native in various charset, |
|
| 967 | // by extending xmlrpc_encode_entitites() and setting xmlrpc_internalencoding |
|
| 968 | if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
|
|
| 969 | {
|
|
| 970 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); |
|
| 971 | } |
|
| 972 | else |
|
| 973 | {
|
|
| 974 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); |
|
| 975 | } |
|
| 976 | ||
| 977 | if ($this->functions_parameters_type != 'xmlrpcvals') |
|
| 978 | xml_set_element_handler($parser, 'xmlrpc_se', 'xmlrpc_ee_fast'); |
|
| @@ 2665-2672 (lines=8) @@ | ||
| 2662 | // we use the broadest one, ie. utf8 |
|
| 2663 | // This allows to send data which is native in various charset, |
|
| 2664 | // by extending xmlrpc_encode_entitites() and setting xmlrpc_internalencoding |
|
| 2665 | if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
|
|
| 2666 | {
|
|
| 2667 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); |
|
| 2668 | } |
|
| 2669 | else |
|
| 2670 | {
|
|
| 2671 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); |
|
| 2672 | } |
|
| 2673 | ||
| 2674 | if ($return_type == 'phpvals') |
|
| 2675 | {
|
|
| @@ 3647-3654 (lines=8) @@ | ||
| 3644 | xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); |
|
| 3645 | // What if internal encoding is not in one of the 3 allowed? |
|
| 3646 | // we use the broadest one, ie. utf8! |
|
| 3647 | if (!in_array($GLOBALS['xmlrpc_internalencoding'], array('UTF-8', 'ISO-8859-1', 'US-ASCII')))
|
|
| 3648 | {
|
|
| 3649 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); |
|
| 3650 | } |
|
| 3651 | else |
|
| 3652 | {
|
|
| 3653 | xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $GLOBALS['xmlrpc_internalencoding']); |
|
| 3654 | } |
|
| 3655 | xml_set_element_handler($parser, 'xmlrpc_se_any', 'xmlrpc_ee'); |
|
| 3656 | xml_set_character_data_handler($parser, 'xmlrpc_cd'); |
|
| 3657 | xml_set_default_handler($parser, 'xmlrpc_dh'); |
|