ñ breaks my rss feeds

Hello forums

For some strange reason the letter ñ or ñ breaks my rss feeds. Words like “Cariño” or “Cañete”. Does anyone knows why?


Thanks for all the help

There are only 5 named entities XML processors need to support by default and ntilde is not one of them. You need to use the numeric entity reference for that character instead. There are some useful notes in the comments here about automating that.

thanks it now works with htmlentities:

echo '<description>'.htmlentities($desc, ENT_QUOTES).'</description>'."\

Another question though when I run a feed validator it throws me this error:

Your feed appears to be encoded as “windows-1252”, but your server is reporting “US-ASCII”


I did this:

echo '<?xml version="1.0" encoding="windows-1252"?>'."\

When I do this:

echo '<?xml version="1.0" encoding="US-ASCII"?>'."\

It throws me more errors…

Please enlighten me on this thanks a lot for any help

You can try getting php to send out an appropriate matching header too, as the validator is complaining about the server response.

Thanks AnthonySterling will you please be kind enough to show me how this is done?

I have this code on the very first line of my document

header('Content-type: text/xml');


Sure, I think this would do it. :wink:

header('Content-type: text/xml; charset=windows-1252');

WOW! WOW! it did worked man you look great

Thanks everyone!