Index: openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl,v diff -u -r1.49.2.3 -r1.49.2.4 --- openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 30 Dec 2015 18:09:14 -0000 1.49.2.3 +++ openacs-4/packages/xotcl-core/tcl/bgdelivery-procs.tcl 1 Nov 2016 18:54:06 -0000 1.49.2.4 @@ -323,9 +323,12 @@ } Subscriber instproc send {msg} { + #ns_log notice "SEND <$msg> [my mode]" my log "" if {[my mode] eq "scripted"} { - set smsg "\n" set smsg [format %x [string length $smsg]]\r\n$smsg\r\n } else { @@ -376,17 +379,17 @@ fconfigure [my channel] -translation binary if {[my mode] eq "scripted"} { - set content_type text/html + set content_type "text/html;chartype=utf-8" set encoding "Cache-Control: no-cache\r\nTransfer-Encoding: chunked\r\n" set body "[string repeat { } 1024]\r\n" set body [format %x [string length $body]]\r\n$body\r\n } else { - #set content_type text/plain # Chrome refuses to expose partial response to ajax unless we - # set content_type to octet stream. Drawback is we now need to - # treat special characters on the client side. + # set content_type to octet stream. Drawback is we have to + # force the translation on the channel. set content_type "application/octet-stream" set encoding "" + fconfigure [my channel] -encoding utf-8 set body "" }