Forum OpenACS Development: HTTP Headers question: Content-Type charset

Hi!

I want to change the HTTP Headers the AOLServer is returning, the Content-Type to be precise. I now get

Content-Type: text/html

but I need

Content-Type: text/html charset=utf-8

Can anybody help me?

Thanks!

Collapse
Posted by Claudio Pasolini on
The stock config.tcl already does what you are asking for. Look to the commented link for further details.

ns_section ns/parameters
# Unicode by default:
# see http://dqd.com/~mayoff/encoding-doc.html
ns_param HackContentType 1
ns_param DefaultCharset utf-8
ns_param HttpOpenCharset utf-8
ns_param OutputCharset utf-8
ns_param URLCharset utf-8

Collapse
Posted by Joel Aufrecht on
Which version of openacs are you using? Do you have this:
# Unicode by default:
ns_param   DefaultCharset     utf-8
ns_param   HttpOpenCharset    utf-8
ns_param   OutputCharset      utf-8
ns_param   URLCharset         utf-8
in your config.tcl? It is standard since 5.1 or so.
Collapse
Posted by Esti Alvarez on
Oops, sorry, you are right! I was running OpenACS 5.1 but with an older config.tcl which didn't have these parameters. It works with the right one.

Thanks a lot!