diff -ur tcl-websh.orig/src/generic/formdata.c tcl-websh/src/generic/formdata.c
--- tcl-websh.orig/src/generic/formdata.c	Mon Aug 29 13:24:13 2005
+++ tcl-websh/src/generic/formdata.c	Mon Aug 29 13:30:19 2005
@@ -41,6 +41,7 @@
     int readToEnd = 0;
     int content_length = 0;
     Tcl_DString translation;
+    Tcl_DString encoding;
 
     channel = Web_GetChannelOrVarChannel(interp, channelName, &mode);
     if (channel == NULL) {
@@ -63,7 +64,9 @@
     }
 
     Tcl_DStringInit(&translation);
+    Tcl_DStringInit(&encoding);
     Tcl_GetChannelOption(interp, channel, "-translation", &translation);
+    Tcl_GetChannelOption(interp, channel, "-encoding", &encoding);
     Tcl_SetChannelOption(interp, channel, "-translation", "binary");
 
     /* ------------------------------------------------------------------------
@@ -88,7 +91,9 @@
 	    if (Tcl_GetIntFromObj(interp, len, &content_length) != TCL_OK) {
 
 		Tcl_SetChannelOption(interp, channel, "-translation", Tcl_DStringValue(&translation));
+		Tcl_SetChannelOption(interp, channel, "-encoding", Tcl_DStringValue(&encoding));
 		Tcl_DStringFree(&translation);
+		Tcl_DStringFree(&encoding);
 		/* unregister if was a varchannel */
 		Web_UnregisterVarChannel(interp, channelName, channel);
 		return TCL_ERROR;
@@ -122,7 +127,9 @@
 	    Tcl_DecrRefCount(formData);
 
 	    Tcl_SetChannelOption(interp, channel, "-translation", Tcl_DStringValue(&translation));
+	    Tcl_SetChannelOption(interp, channel, "-encoding", Tcl_DStringValue(&encoding));
 	    Tcl_DStringFree(&translation);
+	    Tcl_DStringFree(&encoding);
 	    /* unregister if was a varchannel */
 	    Web_UnregisterVarChannel(interp, channelName, channel);
 
@@ -131,7 +138,9 @@
     }
 
     Tcl_SetChannelOption(interp, channel, "-translation", Tcl_DStringValue(&translation));
+    Tcl_SetChannelOption(interp, channel, "-encoding", Tcl_DStringValue(&encoding));
     Tcl_DStringFree(&translation);
+    Tcl_DStringFree(&encoding);
     /* unregister if was a varchannel */
     Web_UnregisterVarChannel(interp, channelName, channel);
 
@@ -560,7 +569,7 @@
      * open file
      * ----------------------------------------------------------------------- */
     if ((out = Tcl_OpenFileChannel(NULL, Tcl_GetString(tmpFileName),
-				   "w", 0644)) == NULL)
+				   "w", 0600)) == NULL)
 	return 0;
 
     /* --------------------------------------------------------------------------
diff -ur tcl-websh.orig/src/generic/weboutint.c tcl-websh/src/generic/weboutint.c
--- tcl-websh.orig/src/generic/weboutint.c	Mon Aug 29 13:24:13 2005
+++ tcl-websh/src/generic/weboutint.c	Mon Aug 29 13:58:31 2005
@@ -470,7 +470,7 @@
 		startmatch = 0;
 	    }
 	    prev = cur;
-	    cur ++;
+	    cur = (char *)Tcl_UtfNext(cur);
 	    continue;
 	} else if (*cur == strend[endmatch] && (cntOpen > 0 || *prev == '\\')) {
 	    if (*prev == '\\') {
@@ -488,7 +488,7 @@
 		endmatch = 0;
 	    }
 	    prev = cur;
-	    cur ++;
+	    cur = (char *)Tcl_UtfNext(cur);
 	    continue;
 	} else if (startmatch) {
 	    if (cntOpen < 1) {
@@ -513,7 +513,7 @@
 	    Tcl_DStringAppend(&dstr, cur, 1);
 	}
 	prev = cur;
-	cur ++;
+	cur = (char *)Tcl_UtfNext(cur);
     }
 
     /* build up the web::put with the name of the channel. */
diff -ur tcl-websh.orig/src/tests/mintest.test tcl-websh/src/tests/mintest.test
--- tcl-websh.orig/src/tests/mintest.test	Mon Aug 29 13:24:13 2005
+++ tcl-websh/src/tests/mintest.test	Mon Aug 29 13:49:40 2005
@@ -36,7 +36,7 @@
     set res ""
     catch {
 	##  fixme: use variable for tclsh8.3
-	set res [exec tclsh8.3 $fn]
+	set res [exec tclsh8.4 $fn]
     }
     file delete -force $fn
     set res
diff -ur tcl-websh.orig/src/unix/Makefile.in tcl-websh/src/unix/Makefile.in
--- tcl-websh.orig/src/unix/Makefile.in	Mon Aug 29 13:24:13 2005
+++ tcl-websh/src/unix/Makefile.in	Mon Aug 29 13:52:43 2005
@@ -175,7 +175,7 @@
 
 INCLUDES = @TCL_INCLUDES@ $(HTTPD_INCLUDES)
 
-EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS)
+EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS) $(TCL_EXTRA_CFLAGS)
 
 DEFS = @DEFS@ $(EXTRA_CFLAGS)
 
@@ -290,7 +290,7 @@
 
 websh$(VERSION): tclAppInit.$(OBJEXT) $(web_OBJECTS)
 	$(CC) @LDFLAGS@ tclAppInit.$(OBJEXT) $(web_OBJECTS) \
-	$(TCL_LIB_SPEC) $(TCL_LIBS) -o websh$(VERSION)
+	$(TCL_LIB_SPEC) $(TCL_LIBS) $(TCL_LD_FLAGS) -o websh$(VERSION)
 
 
 mod_websh$(SHARED_LIB_SUFFIX): $(web_ap_OBJECTS)
@@ -385,15 +385,35 @@
 # =============================================================================
 
 install-doc: doc
-	$(mkinstalldirs) $(DESTDIR)/doc
-	@for i in quickref.html quickref.txt ; \
+	$(mkinstalldirs) $(DESTDIR)/doc/html
+	@for i in Apache_module_specific_commands.html \
+		command_dispatching_and_session_management.html \
+		configuration.html \
+		context_handling.html \
+		data_encryption.html \
+		file_handling_and_file_IO.html \
+		index.html \
+		inter-process_and_-system_communication.html \
+		logging.html \
+		misc_commands.html \
+		request_data_handling.html \
+		response_data_handling.html \
+		uri-html-_en-decoding.html ; \
+	do \
+	echo "Installing $$i"; \
+	rm -f $(DESTDIR)/doc/html/$$i; \
+	$(INSTALL_DATA) ../../doc/html/$$i $(DESTDIR)/doc/html/$$i ; \
+	chmod 444 $(DESTDIR)/doc/html/$$i; \
+	done
+	@for i in INSTALL README  ; \
+
 	do \
 	echo "Installing $$i"; \
 	rm -f $(DESTDIR)/doc/$$i; \
-	$(INSTALL_DATA) ../../doc/$$i $(DESTDIR)/doc/$$i ; \
+	$(INSTALL_DATA) ../../$$i $(DESTDIR)/doc/$$i ; \
 	chmod 444 $(DESTDIR)/doc/$$i; \
 	done
-	@for i in README license.terms ChangeLog changes ; \
+	@for i in ChangeLog license.terms  ; \
 	do \
 	echo "Installing $$i"; \
 	rm -f $(DESTDIR)/doc/$$i; \
