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.5 -r1.6 --- openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 19 Dec 2007 18:12:39 -0000 1.5 +++ openacs-4/packages/xotcl-core/tcl/http-client-procs.tcl 19 Dec 2007 21:06:58 -0000 1.6 @@ -147,13 +147,16 @@ set S [socket $host $port] } - HttpRequest instproc set_encoding {{-text_translation auto} content_type} { + HttpRequest instproc set_encoding { + {-text_translation {auto binary}} + content_type + } { # # for text, use translation with optional encodings, else set translation binary # if {[string match text/* $content_type]} { - if {[regexp {*charset=([^ ]+)$} $content_type _ encoding]} { - fconfigure [my set S] -encoding $encoding -translation $text_translation + if {[regexp {charset=([^ ]+)$} $content_type _ encoding]} { + fconfigure [my set S] -translation $text_translation -encoding $encoding } else { fconfigure [my set S] -translation $text_translation }