« Integrating Ivy with AntAnt to manage jar files | Main | Real programmers manage petabytes with Java and Python »

Serving up XML feeds from TextDrive

According to the feedvalidator my feeds as generated by Movable Type are being served up as ASCII, even though they are encoded as UTF-8.

Here's what to do. In the folder where your feeds live, create a .htaccess file and populate it with suitable AddCharset and AddType directives. For example I serve index.xml for RSS1.0 (which is RDF), index.xml (RSS2.0) and atom.xml ( Atom) along with an rsd.xml file for the RSD spec. Here's the .htaccess file:

  <Files "atom.xml">
    AddCharset UTF-8 .xml
    AddType 'application/atom+xml; charset=UTF-8' .xml
  </Files>
  <Files "index.xml">
    AddCharset UTF-8 .xml
    AddType 'application/rdf+xml; charset=UTF-8' .xml
  </Files>
  <Files "index.rdf">
    AddCharset UTF-8 .rdf
    AddType 'application/xml; charset=UTF-8' .rdf
  </Files>
  <Files "rsd.xml">
    AddCharset UTF-8 .xml
    AddType 'application/xml; charset=UTF-8' .xml
  </Files>

Incidently, it looks like JavaBlogs is barfing on Atom1.0 feeds (I imagine that's down to Rome only supporting as far as 0.3). I repointed JavaBlogs at an RSS1.0 Java category feed for the time being (no doubt the last 20 something posts will show up over there).


October 2, 2005 11:51 PM

Comments

Post a comment

(you may use HTML tags for style)




Remember Me?

Trackback Pings

TrackBack URL for this entry:
http://www.dehora.net/mt/mt-tb.cgi/1651