diff --git a/src/FeedIo/Reader/Document.php b/src/FeedIo/Reader/Document.php index 24f6269a..9f26eb78 100644 --- a/src/FeedIo/Reader/Document.php +++ b/src/FeedIo/Reader/Document.php @@ -34,7 +34,7 @@ class Document */ public function __construct(string $content) { - $this->content = trim($content); + $this->content = trim(str_replace("\xEF\xBB\xBF", '', $content)); } /** @@ -43,7 +43,7 @@ public function __construct(string $content) */ public function startWith(string $character) : bool { - return substr($this->content, 0, 1) === $character; + return mb_substr($this->content, 0, 1) === $character; } /**