diff --git a/src/nusoap.php b/src/nusoap.php index 2e9b79d..1f65e66 100755 --- a/src/nusoap.php +++ b/src/nusoap.php @@ -7141,7 +7141,7 @@ function character_data($parser, $data) // raw UTF-8 that, e.g., might not map to iso-8859-1 // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); if ($this->decode_utf8) { - $data = utf8_decode($data); + $data = function_exists('mb_convert_encoding') ? mb_convert_encoding($data, 'ISO-8859-1', 'UTF-8') : utf8_decode($data); } } $this->message[$pos]['cdata'] .= $data;