Commit f6cae094 authored by Steven Wittens's avatar Steven Wittens

- Specify default XML encoding for not-so-well-formed files

(sorry last commit, I promise :P)
parent 205aa25e
......@@ -326,6 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
$encoding = 'utf-8';
if (ereg('^<\?xml[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
......@@ -326,6 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
$encoding = 'utf-8';
if (ereg('^<\?xml[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
......@@ -326,6 +326,7 @@ function import_refresh($feed) {
}
// extract the XML file's encoding (the XML parser in PHP4 doesn't do this by itself):
$encoding = 'utf-8';
if (ereg('^<\?xml[^>]+encoding="([^"]+)"', $data, $match)) {
$encoding = $match[1];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment