Forum OpenACS Development: Re: Using noquote with ad_form and formtemplate

Collapse
Posted by Tom Jackson on

You might look into using ns_conn outputheaders, where you can set any header. I'm not sure if this might get reset after the tcl page is sourced or not, but it might allow you to do what you want. For instance, you might look at template::set_http_status, and see how that all works too.

Collapse
Posted by Branimir Dolicki on
Tom,

You are right:

ns_set put [ns_conn outputheaders] Content-Type "text/html; charset=yourcharset"

Will do the trick. I confused this with the case where I wanted to set the charset on some HTML pages sitting in the filesystem and output witn ns_returnfile.