summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2003-04-16 23:08:34 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2003-04-16 23:08:34 (GMT)
commitb97ca5b2bb3826e20a13ff1583baf7df0d8754f6 (patch)
treec7a68b6ec6edd82edc833f33f736847cb21fac9a
parentf429b01fe53eff471ddd77950f587430b93952f9 (diff)
downloadtcl-b97ca5b2bb3826e20a13ff1583baf7df0d8754f6.zip
tcl-b97ca5b2bb3826e20a13ff1583baf7df0d8754f6.tar.gz
tcl-b97ca5b2bb3826e20a13ff1583baf7df0d8754f6.tar.bz2
If you deal with network sockets, you should care about encodings. Tcl cannot
guess it for you. Updated socket docs to remind people about this. [Bug 630621]
-rw-r--r--ChangeLog5
-rw-r--r--doc/socket.n11
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0372d30..68a0944 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-17 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+
+ * doc/socket.n: Added a paragraph to remind people to specify
+ their encodings when using sockets. [Bug 630621]
+
2003-04-16 Donal K. Fellows <fellowsd@cs.man.ac.uk>
* doc/CrtMathFnc.3: Functions also have to deal with wide ints,
diff --git a/doc/socket.n b/doc/socket.n
index 51332f7..6d4242a 100644
--- a/doc/socket.n
+++ b/doc/socket.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: socket.n,v 1.7 2002/10/01 10:03:19 dkf Exp $
+'\" RCS: @(#) $Id: socket.n,v 1.7.2.1 2003/04/16 23:08:36 dkf Exp $
.so man.macros
.TH socket n 8.0 Tcl "Tcl Built-In Commands"
.BS
@@ -29,6 +29,13 @@ releases may include support for additional protocols.
The \fBsocket\fR command may be used to open either the client or
server side of a connection, depending on whether the \fB\-server\fR
switch is specified.
+.PP
+Note that the default encoding for \fIall\fB sockets is the system
+encoding, as returned by \fBencoding system\fR. Most of the time, you
+will need to use \fBfconfigure\fR to alter this to something else,
+such as \fIutf\-8\fR (ideal for communicating with other Tcl
+processes) or \fIiso8859\-1\fR (useful for many network protocols,
+especially the older ones).
.SH "CLIENT SOCKETS"
.PP
@@ -138,7 +145,7 @@ list is identical to the address, its first element.
.PP
.SH "SEE ALSO"
-flush(n), open(n), read(n)
+fconfigure(n), flush(n), open(n), read(n)
.SH KEYWORDS
bind, channel, connection, domain name, host, network address, socket, tcp