1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-08 14:39:19 +00:00

parser: force libxml error messages to valid utf8

This commit is contained in:
Andrew Dolgov
2019-05-12 10:13:22 +03:00
parent e981d52bda
commit 9423d72f6c
2 changed files with 6 additions and 2 deletions

View File

@@ -183,10 +183,12 @@ class FeedParser {
}
}
// libxml may have invalid unicode data in error messages
function error() {
return $this->error;
return UConverter::transcode($this->error, 'UTF-8', 'UTF-8');
}
// WARNING: may return invalid unicode data
function errors() {
return $this->libxml_errors;
}