On Thu, Mar 12, 2009 at 1:44 PM, Jerome Velociter <jerome@xwiki.com> wrote:
-- 5 hours ago Errors -- xwiki/bin/view/Main/WebRss?xpage=rdf -- 5 hours ago Errors
The reported problem coming from xwiki's xpage=rdf feeds:
*Unsupported file format*
Just an idea... maybe they expect the ".xml" extension ?
Thanks for the hint. The other feeds don't have XML extension, however, I believe your answer is close to the problem. No matter what I did in my setup, I was getting <?xml version="1.0" encoding="ISO-8859-1" ?>
The roller blog atom feed that *does* work correctly w/ google sitemaps returns:
<?xml version="1.0" encoding='utf-8'?>
I fixed this issue by running java with -Dfile.encoding=UTF-8 (note the lowercase setting suggested in http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Performances seems incorrect?). When that alone didn't work, I also added " -Djavax.servlet.request.encoding=UTF-8-DjavaEncoding=UTF-8" which had been suggested in solving this problem for other Tomcat users. (Now I run java with the following options:-server -Xms160m -Xmx1024m -XX:PermSize=160m -XX:MaxPermSize=320m -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -DjavaEncoding=UTF-8 -Djava.awt.headless=true) I also saw other suggestions to set LANG="en_US.UTF-8" in the tomcat launching script... however, I'm not sure which of my changes "did" it, but i believe that following two steps I'd forgotten||skipped in http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding caused the correct encoding to be used: (1) WEB-INF> diff web.xml.~1~ web.xml 23c23 < <param-value>ISO-8859-1</param-value> ---
<param-value>UTF-8</param-value>
(2) WEB-INF> diff xwiki.cfg.~2~ xwiki.cfg 29c29 < xwiki.encoding=ISO-8859-1 ---
xwiki.encoding=UTF-8
With all of the above now reconfigured, I now get the correct output for http://nielsmayer.com/xwiki/bin/view/Main/WebRss?xpage=rdf : <?xml version="1.0" encoding="UTF-8" ?> I'll find out whether changing the encoding fixes the *"Unsupported file format*" error when passing a Xwiki RDF feed to http://www.google.com/webmasters/tools/docs/en/about.html . -- Niels http://nielsmayer.com PS: Why not just have xwiki.cfg's default be: 'xwiki.encoding=UTF-8' ; likewise have web.xml's default for com.xpn.xwiki.web.SetCharacterEncodingFilter's 'encoding' be UTF-8. These encoding errors that oft go unnoticed are probably resulting in a number of configuration errors, and perhaps other bug-reports that aren't entirely valid, should they depend on encoding issues.