Feed RSS and accented and other special chars [message #169675] |
Wed, 22 September 2010 14:28 |
Luk
Messages: 1 Registered: September 2010
Karma:
|
Junior Member |
|
|
Hello to all,
I've a problem that's making me moderately mad.
I need to generate a feed RSS, but i have to take data from tables
containing a lot of different vowels, special chars and so on.
If I use http://www.ajaxray.com/blog/2008/03/08/php-universal-feed-generator-support s-rss-10-rss-20-and-atom/
in plain way, I obtain a feed RSS that's bugged, where bug (according
to IE) corresponds to the first character containing &
I thought i simply needeed to escape the vowels.
If i put a simple code snippet like this:
$titolo = str_replace("à", "& agrave;'", $row['titolo']);
it's not working.
In fact, the feed RSS is correctly generated but it writes & a grave;
literally
(note that the letters are voluntery spaced to avoid unwanted
substitutions in browser)
Main question: Why this behaviour and , is there a way to exit from
this hell?
Not-so-secondary Question:
How to transform each hex code in a html entity in the cycle?
Thanks to all!!
Luk
|
|
|