Forum OpenACS Q&A: Response to Trouble of Japanese environment

Collapse
Posted by Henry Minsky on
ns_startcontent is a primitive command in AOLserver, added as
part of the ArsDigita patches to AOLserver.

It tells AOLserver to set the output character set encoding
to a given character set. Then, all output from Tcl (which
is UTF8 internally) is converted to that encoding as it
is sent to the network.

ns_startcontent is needed to be set before a page does ns_write, if
you want to ensure the output encoding conversion is done correctly.

ns_return returns a whole string at once, and will automatically
look at the MIME type and if it sees a "charset=xxx" it will
set that charset as the output encoding.