XMLTV spanish characters not appearing correctly

131 Views Asked by At

I have been working with XMLTV and I have found that Spanish characters are not appearing in the EPG correctly, I believe this will be an issue with the xml encoding but I have tested this with both:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8" ?>

And I am still having issues with Spanish characters, any suggestions?

Update:

I am reading in an xml file and converting it to XMLTV, everything works correctly as expected apart from the spanish characters.

void parseStory( xmlDocPtr doc, xmlNodePtr cur, char szFilename[256] ) {

tvNode        = xmlNewTextChild( cur, NULL, "tv", NULL);
channelNode   = xmlNewTextChild( tvNode, NULL, "channel", NULL );
progTitle = xmlNewTextChild( programmeNode, NULL, "title", title );
xmlNewProp( progTitle, "lang", "es" );

displayName = xmlNewTextChild( channelNode, NULL, "display-name", key );
xmlNewProp( channelNode, "id", key );
xmlFree( key );

xmlDocSetRootElement( doc, tvNode );

//Saving (overwriting) file after changes
//xmlSaveFormatFile( (const xmlChar *) szFilename, doc, 1 );
int count;
count = xmlSaveFormatFileEnc( (const xmlChar *) szFilename, doc, "UTF-8", 1 );
syslog( LOG_INFO, "File: %s", szFilename );
syslog( LOG_INFO, "Count: %d", count );

}

This is just a snippet and won't make perfect sense without all but the areas I think affect the spanish characters are the lang props and xmlSaveFormatFileEnc()

0

There are 0 best solutions below