Forum OpenACS Q&A: can't find but am being told to use ns_startcontent

I followed the thread about how to get charsets working for .tcl
and .adp.:
https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0001Th

I can get characters to correctly display with ns_return and ns_puts.
However, ns_writes combined with ReturnHeaders still gives garbage.

I have found the following procedural fix:
http://linuxlab.dk/fcl/technotes/openacs.html

  proc ReturnHeaders {{content_type text/html}} {
      set all_the_headers "HTTP/1.0 200 OK
  MIME-Version: 1.0
  Content-Type: $content_type
"
    util_WriteWithExtraOutputHeaders $all_the_headers
    ns_startcontent -type $content_type
  }
  ...

  proc_doc ad_return_top_of_page {first_part_of_page {content_type
text/html}} "Returns HTTP headers plus the top of the user-ivisible
page.  Saves a TCP packet (and therefore some overhead) compared to
using ReturnHeaders and an ns_write." {
      set all_the_headers "HTTP/1.0 200 OK
  MIME-Version: 1.0
  Content-Type: $content_type
"
    ns_startcontent -type $content_type
      util_WriteWithExtraOutputHeaders $all_the_headers
$first_part_of_page
  }

However, when I attempt to apply it, the line:
ns_startcontent -type $content_type
trips up and brings down the entire application.

According to arsDigita's multilingual encoding doc, ns_startcontent
is a NEW API.
I cannot find a reference to it in the AOL server documentation, nor
in any aD or openacs documentation.

Can anyone please tell me where I can find
  a) documentation for ns_startcontent
  b) a patch or release that contains ns_startcontent
  c) another way to ensure that the headers being written with
ReturnHeaders and ad_return_top_of_page specify the charset so that
ns_write does not spit out garbage?

You said "However, when I attempt to apply it, the line: ns_startcontent -type $content_type trips up and brings down the entire application. "

Does that mean that AOLserve crashes, dumps core, etc? Or just that you get an error? What is the error?

You need to give some more information here ...