title: simplexml_load_string(): Entity: line 1: parser error : Document labelled UTF-16 but has UTF-8 content
body: <p>My PHP version is - 8.1</p>
  <p>I'm trying to convert an XML response into an array in PHP using this code</p>
  <pre><code>$xml = simplexml_load_string($response, SimpleXMLElement::class, LIBXML_NOCDATA);
  $json = json_encode($xml);
  $response = json_decode($json, TRUE);
  </code></pre>
  <p>The response seems get converted alright when I dump and die <code>$response</code></p>
  <p>However an exception is still thrown:</p>
  <pre><code>simplexml_load_string(): Entity: line 1: parser error : Document labelled UTF-16 but has UTF-8 content') as this code block is surrounded in a try catch
  </code></pre>
  <p><strong>This code works inside on another system im working on which is PHP 7.2 and uses the exact same XML response</strong></p>
  <p>I've been trying to find out if any additional changes needed to be made since upgrading to 8.1?</p>
  <p>I've tried doing quick fixes using regex to remove the special characters but had no luck</p>