summaryrefslogtreecommitdiffstats
path: root/doc/fcopy.n
diff options
context:
space:
mode:
authorandreas_kupries <andreas_kupries@noemail.net>2001-05-19 16:59:03 (GMT)
committerandreas_kupries <andreas_kupries@noemail.net>2001-05-19 16:59:03 (GMT)
commit54ab0cfbd1a3a208400a691313616adcc5bd6e57 (patch)
treea78123e9749208113de90e336eed5b34b1bd2173 /doc/fcopy.n
parent76f496bf9155994396757cced38b71a4699656af (diff)
downloadtcl-54ab0cfbd1a3a208400a691313616adcc5bd6e57.zip
tcl-54ab0cfbd1a3a208400a691313616adcc5bd6e57.tar.gz
tcl-54ab0cfbd1a3a208400a691313616adcc5bd6e57.tar.bz2
* Note that "tclbench" (see project "tcllib") was extended with
performance benchmarks for [fcopy] too. * doc/fcopy.n: Updated to reflect the extended behaviour of 'fcopy'. * tests/io.test: Added tests 'io-52.9', 'io-52.10' and 'io-52.11' to test the handling of encodings by 'fcopy' / 'TclCopychannel' [Bug #209210]. * generic/tclIO.c: Split of both 'Tcl_ReadChars' and 'Tcl_WriteChars' into a public error checking and an internal working part. The public functions now use the new internal ones. The new functions are 'DoReadChars' and 'DoWriteChars'. Extended 'CopyData' to use the new functions 'DoXChars' when required by the encodings on the input and output channels [Bug #209210]. FossilOrigin-Name: cff0564319e6d5906699199ba548d377c95e6909
Diffstat (limited to 'doc/fcopy.n')
-rw-r--r--doc/fcopy.n15
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/fcopy.n b/doc/fcopy.n
index 5261f70..30b8dfe 100644
--- a/doc/fcopy.n
+++ b/doc/fcopy.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: fcopy.n,v 1.2 1998/09/14 18:39:52 stanton Exp $
+'\" RCS: @(#) $Id: fcopy.n,v 1.3 2001/05/19 16:59:04 andreas_kupries Exp $
'\"
.so man.macros
.TH fcopy n 8.0 Tcl "Tcl Built-In Commands"
@@ -71,6 +71,19 @@ can be different than the number of bytes written to \fIoutchan\fR.
Only the number of bytes written to \fIoutchan\fR is reported,
either as the return value of a synchronous \fBfcopy\fP or
as the argument to the callback for an asynchronous \fBfcopy\fP.
+.PP
+\fBFcopy\fR obeys the encodings configured for the channels. This
+means that the incoming characters are converted internally first
+UTF-8 and then into the encoding of the channel \fBfcopy\fR writes
+to. See the manual entry for \fBfconfigure\fR for details on the
+\fB\-encoding\fR option. No conversion is done if both channels are
+set to encoding "binary". If only the output channel is set to
+encoding "binary" the system will write the internal UTF-8
+representation of the incoming characters. If only the input channel
+is set to encoding "binary" the system will assume that the incoming
+bytes are valid UTF-8 characters and convert them according to the
+output encoding. The behaviour of the system for bytes which are not
+valid UTF-8 characters is undefined in this case.
.SH EXAMPLE
.PP