Warning: include_once(/www/templates/gt/parts/blogs/groupertips/first.php) [function.include-once]: failed to open stream: No such file or directory in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 19

Warning: include_once() [function.include]: Failed opening '/www/templates/gt/parts/blogs/groupertips/first.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 19

Thursday, October 07, 2004

If Atom feed conversion only works part of the time... 

If you have been using the XML and Atom plugins for Grouper Evolution to convert Atom feeds to RSS, and it sometimes works, but you sometimes get errors, it may be caused by the character encoding of the Atom feed. To check, load the Atom feed in your web browser, view the source, and take a look at the first line. It will probably look something like this:

<?xml version="1.0" charset="UTF-8" ?>

If instead of "UTF-8", it says "ISO-8859-1" or "US-ASCII", then this is not the source of the problem. In fact, "ISO-8859-any number" shouldn't cause errors, though some characters may display incorrectly. If the charset is anything else, for example, "windows-1252", then this probably is the source of the problem.

The problem is that, while windows-1252 is almost identical to ISO-8859-1, it contains a few additional characters like smart quotes, etc. When the feed doesn't contain any of those characters, Grouper will work fine. But whenever one of those characters appears, there will be an XML parsing error. The reason for this is that PHP's XML parser only supports three character sets: UTF-8, ISO-8859-1 and US-ASCII.

If the Atom feed is under your control, for example, if it's from your own Blogger blog, then you may be able to solve the problem by changing the character encoding of the feed. I'd recommend using UTF-8, since it will support pretty much any character you might ever want to display--that's why it's the default encoding for XML files. In Blogger, you can change the encoding by clicking the "Settings" tab, clicking "Formatting" under the tabs, finding the Encoding popup, and changing it's value.
// posted by Antone Roundy @ 5:10 PM

0 Comments:

Post a Comment

http://grouper.docs.geckotribe.com/tips/2004/10/if-atom-feed-conversion-only-works.php

This page is powered by Blogger. Isn't yours?


Warning: include_once(/www/templates/gt/parts/blogs/groupertips/second.php) [function.include-once]: failed to open stream: No such file or directory in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 61

Warning: include_once() [function.include]: Failed opening '/www/templates/gt/parts/blogs/groupertips/second.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 61
ARCHIVES

Warning: include_once(/www/templates/gt/parts/blogs/groupertips/third.php) [function.include-once]: failed to open stream: No such file or directory in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 68

Warning: include_once() [function.include]: Failed opening '/www/templates/gt/parts/blogs/groupertips/third.php' for inclusion (include_path='.:/usr/local/lib/php') in /www/gt/docs/grouper/tips/2004/10/if-atom-feed-conversion-only-works.php on line 68