summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-05-01 17:16:36 +0100
committerRichard Hughes <richard@hughsie.com>2014-05-01 17:16:36 +0100
commit3f855ac4b185337e4abcadbf99db91c467562435 (patch)
tree8d70b578033a3a474cadf2f6597e105120b16d24
parent80e2762e7e6fb0d5aaacec353d835f2ae049e675 (diff)
downloadappstream-glib-3f855ac4b185337e4abcadbf99db91c467562435.tar.gz
Be less strict with the case of the XML header
http://stackoverflow.com/questions/3251954/xml-file-encoding-format-utf-8-vs-utf-8
-rw-r--r--libappstream-glib/as-app.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index 633b3f2..f24ff65 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -2502,6 +2502,8 @@ as_app_parse_appdata_file (AsApp *app,
/* validate */
tmp = g_strstr_len (data, len, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
if (tmp == NULL)
+ tmp = g_strstr_len (data, len, "<?xml version=\"1.0\" encoding=\"utf-8\"?>");
+ if (tmp == NULL)
priv->problems |= AS_APP_PROBLEM_NO_XML_HEADER;
/* check for copyright */