Skip to content

Commit

Permalink
mb_convert_encoding support
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored and f3l1x committed Jun 17, 2022
1 parent 50c021f commit 93075b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nusoap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 93075b9

Please sign in to comment.