Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By bjergtrold on
I want to syndicate my site.
There is only one problem, the content is mostly in german, so there are lots of umlauts. The format_rss_channel function in common.inc uses htmlentities. This function translates the umlauts into html code (
Comments
translating umlauts into entities is correct RSS
see http://web.resource.org/rss/1.0/spec. if a RSS reader can't display it, the reader is broken. which one is yours?
Maybe
*sigh* Till now I haven't found any RSS reader which can display it right. Opera, IE and the RSS Validator report broken XML. Any german RSS of any importance doesn't use encoded html entities.
Oh well, for the time being I will use my kluge...
the spec says
Entities:
[...]
Note: Since RSS 1.0 does not require a DTD, be sure to include inline
declarations of entities used aside from the aforementioned five. The following
DTD fragments are very useful as a source of HTML-compatible entities.
[...]
that's exactly what drupal does (with the xhtml-lat1.ent, which includes german umlauts). if opera and ie can't display it, than it's because they are unable to deal with RSS feeds natively (see also this closed bug). if the RSS Validator doesn't validate drupal feeds containing umlauts, it's because it doesn't validate the inline declaration properly. but it's not drupal's fault.
*sigh* (couldn't resist )
I know its not Drupal's fault...
...but if everybody else is doing it wrong... *sigh*