Permalink
Browse files

fixed: Put the UTF-8 descriptor on the XML before feeding it to c-pluff

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@30338 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 4488d3a commit cfe53d3b760602fc4de10adf50ecd21f20968e21 jmarshallnz committed May 20, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 xbmc/addons/AddonManager.cpp
@@ -1022,11 +1022,14 @@ bool CAddonMgr::AddonsFromInfoXML(const TiXmlElement *root, VECADDONS &addons)
if (!root || !context)
return false;
+ // each addon XML should have a UTF-8 declaration
+ TiXmlDeclaration decl("1.0", "UTF-8", "");
const TiXmlElement *element = root->FirstChildElement("addon");
while (element)
{
- // dump the XML back to text (FIXME: should we add the utf8 descriptor?)
+ // dump the XML back to text
std::string xml;
+ xml << decl;
xml << *element;
cp_status_t status;
cp_plugin_info_t *info = m_cpluff->load_plugin_descriptor(context, xml.c_str(), xml.size(), &status);

0 comments on commit cfe53d3

Please sign in to comment.