From ca5061330484362dc803f737669f1203f31f0141 Mon Sep 17 00:00:00 2001 From: dkf Date: Wed, 16 Apr 2003 23:08:34 +0000 Subject: 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] FossilOrigin-Name: 09bd2adfb4ada54e1fc7cb46542b9b25c84d0237 --- ChangeLog | 5 +++++ doc/socket.n | 11 +++++++++-- 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 + + * doc/socket.n: Added a paragraph to remind people to specify + their encodings when using sockets. [Bug 630621] + 2003-04-16 Donal K. Fellows * 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 -- cgit v0.12