How to use special characters in an RSS feed

Status
Not open for further replies.

oliflorence

New Member
hi,
I have an RSS feed for a French site, when French accents are used I turn them to HTML special characters but this throws an error.

Does any one know how to use those, here the code I have:

HTML:
<item>
<title>[CDATA[s&eacute;jour record]]</title>
<description>[CDATA[s&eacute;jour record bla bla bla]]</description>
<link>Some URL here</link>
</item>

many thanks
 

php.allstar

New Member
Hi you need to add some encoding for the region you are targetting for starters..

Code:
<?xml version="1.0" encoding="UTF-8"?>
 

php.allstar

New Member
Your cdata tags dont look to be properly formed, try this...

Code:
<element>[B]<![CDATA[[/B][B]special characters here]]>[/B]</element>

notice the angled brackets and exclamation mark, although I'm not convinced this is the root of the problem.

XML only supports the following html entities as far as i know "&amp; &lt; &gt; &quot;" anthing else would have your rss reader barking.

The solution is to inly use legal charcters for the encoding you are using.

Is &eacute; a valid legal character for the encoding you are using?

I put utf-8 as an example you have to use the one that suits the locality you are targetting.
 
Status
Not open for further replies.
Top