Page 1 of 1
special characters in CDATA[]
Posted: Sun May 25, 2008 8:41 pm
by kendall
Hi,
I have an rss feed file in which i have characters such as
é and ’
htmlentities() is not working and wrapping it in CDATA isn't helping at all...is there anyway to combat this?
Re: special characters in CDATA[]
Posted: Tue May 27, 2008 12:44 pm
by kaszu
If you know character code (for example 44), then you can replace it with its decimal entity , which is valid in xml
Edit:
Have a look here:
http://en.wikipedia.org/wiki/List_of_XM ... references
Re: special characters in CDATA[]
Posted: Tue May 27, 2008 1:24 pm
by kendall
Alot of times i encouter feeds that show the characters correctly and at other times they don't
is this something that is browser specific? or is it an encoding factor?
I have these xml files that are called via javascript its proving difficult to go through tag by tag to have to encode the character...isn't there a way to use the headers to serve the xml file correctly?
Re: special characters in CDATA[]
Posted: Tue May 27, 2008 3:27 pm
by kendall
Found this doing some research
http://www.usit.uio.no/it/kurs/xml/chap7.html
still looking into it though