Index: openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl,v diff -u -r1.7.2.4 -r1.7.2.5 --- openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 21 Nov 2008 13:26:32 -0000 1.7.2.4 +++ openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 21 Nov 2008 23:20:23 -0000 1.7.2.5 @@ -327,6 +327,11 @@ HttpCore instproc POST {} { my instvar S post_data + if {[string match "text/*" [my content_type]]} { + # Make sure, "string range" and "string length" return the right + # values for UTF-8 and other encodings. + set post_data [encoding convertto $post_data] + } puts $S "Content-Length: [string length $post_data]" puts $S "Content-Type: [my content_type]" puts $S "" @@ -469,7 +474,7 @@ -mixin ::xo::AsyncHttpRequest::RequestManager \ -url [my url] \ -timeout [my timeout] \ - -post_data [my post_data] \ + -post_data [encoding convertto [my post_data]] \ -request_header_fields [my request_header_fields] \ -content_type [my content_type] \ -user_agent [my user_agent] \