special characters in CDATA[]

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

special characters in CDATA[]

Post 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?
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: special characters in CDATA[]

Post 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
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: special characters in CDATA[]

Post by kendall »

kaszu wrote: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
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?
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: special characters in CDATA[]

Post by kendall »

Found this doing some research

http://www.usit.uio.no/it/kurs/xml/chap7.html

still looking into it though
Post Reply