Builder templates served as US-ASCII


#1

When I produce an xml output with builder, my webserver’s headers say
it’s encoded as US-ASCII. Since I have iso-8859-1 characters in there, I
would like to change it. I use lighttpd as a web server, but I don’t
think it matters since the Builder templates are produced by rails.

Can anyone help?
Has anyone ever produced an actual valid rss feed using Builder?
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fgomagazine.nl%2Frss%2Fhome


#2

On 12/1/05, joost baaij removed_email_address@domain.invalid wrote:

When I produce an xml output with builder, my webserver’s headers say
it’s encoded as US-ASCII. Since I have iso-8859-1 characters in there, I
would like to change it. I use lighttpd as a web server, but I don’t
think it matters since the Builder templates are produced by rails.

Can anyone help?
Has anyone ever produced an actual valid rss feed using Builder?
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fgomagazine.nl%2Frss%2Fhome

Yup…

http://feedvalidator.org/check.cgi?url=http%3A%2F%2Frails.techno-weenie.net%2Fxml%2Frecent.xml

Doh, this is embarassing, but it’s not an encoding error :slight_smile:

Try this in your controller somewhere:

headers[‘Content-Type’] = ‘text/xml; charset=iso-8859-1’


rick
http://techno-weenie.net


#3

Try this in your controller somewhere:

headers[‘Content-Type’] = ‘text/xml; charset=iso-8859-1’

Brilliant, thanks!