We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a3da4c commit 3878490Copy full SHA for 3878490
src/Reader/Reader.php
@@ -363,6 +363,9 @@ public static function importString($string)
363
$disableEntityLoaderFlag = self::disableEntityLoader();
364
$dom = new DOMDocument();
365
$status = $dom->loadXML(trim($string));
366
+ if ($dom->encoding === null) {
367
+ $dom->encoding = 'UTF-8';
368
+ }
369
foreach ($dom->childNodes as $child) {
370
if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
371
throw new Exception\InvalidArgumentException(
0 commit comments