Forum OpenACS Q&A: Response to Support for multibyte: .tcl ok .adp not

Collapse
Posted by Kenny Chiang on
Henry,

Contiune on testing the openacs modules, I found ad_return_top_page proc is not patched to handle charset conversion in your patches. ad_return_top_page is not used in a lot of modules, but for completness you may want to include in your patch set. The patch I did is as follows:

proc_doc ad_return_top_of_page {first_part_of_page{content_type "text/html; charset=big5"}} "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." {
    ns_startcontent -type $content_type
    set all_the_headers "HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: $content_type
"
     util_WriteWithExtraOutputHeaders $all_the_headers $first_part_of_page
}