RE: RSS Feed Accented Characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Would this work?

$content = "El Versículo del Día";
$rss_content .= "<description>" . $content . "</description>\r\n";

Cheers!
Jen



-----Original Message-----
From: Ron Piggott [mailto:ron.php@xxxxxxxxxxxxxxxxxx] 
Sent: Friday, September 30, 2011 11:26 AM
To: php-general@xxxxxxxxxxxxx
Subject:  RSS Feed Accented Characters


I am trying to set up an RSS Feed in the Spanish language using a PHP cron job.  I am unsure of how to deal with accented letters.

An example: 

This syntax:

<?php

$rss_content .= "<description>" . htmlentities("El Versículo del Día") . "</description>\r\n";

?>

Outputs:


<description>El Vers&iacute;culo del D&iacute;a</description>


When I use an RSS Feed validator I receive the error message

This feed does not validate.

  a.. line 24, column 20: XML parsing error: <unknown>:24:20: undefined entity

I suspect the “;” is the issue, although it is needed for the accented letters.  If I don’t use htmlentities() the accented characters can’t be viewed, they become a “?”  How should I proceed?

Ron




www.TheVerseOfTheDay.info 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux