[eluser]Jeffrey McManus[/eluser]
I don't think the fact that I'm echoing code from a controller function is the problem. The problem happens when I use a view to output the data as well.
Also, the HTTP Content-Type header is actually being sent correctly (according to Chrome, it's "text/html; charset=utf-8" which is what I expected).