diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-06-15 22:22:35 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-06-15 22:22:35 (GMT) |
commit | fe584ede8593c32bb4b11e26080a1f8f20ae5955 (patch) | |
tree | bb23b8d26d908087b88cd99ada349fe0fbecafbc /doc | |
parent | 1320b334427ab95c3a96829c189927d14b1d0d3f (diff) | |
download | tcl-fe584ede8593c32bb4b11e26080a1f8f20ae5955.zip tcl-fe584ede8593c32bb4b11e26080a1f8f20ae5955.tar.gz tcl-fe584ede8593c32bb4b11e26080a1f8f20ae5955.tar.bz2 |
Added doc clarification in response to [RFE 768852]
Diffstat (limited to 'doc')
-rw-r--r-- | doc/binary.n | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/doc/binary.n b/doc/binary.n index 98775e0..08ca0a0 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: binary.n,v 1.18 2004/05/24 23:31:42 dkf Exp $ +'\" RCS: @(#) $Id: binary.n,v 1.19 2004/06/15 22:22:37 dkf Exp $ '\" .so man.macros .TH binary n 8.0 Tcl "Tcl Built-In Commands" @@ -63,7 +63,7 @@ to just after the last byte stored. The cursor is initially at position 0 at the beginning of the data. The type may be any one of the following characters: .IP \fBa\fR 5 -Stores a character string of length \fIcount\fR in the output string. +Stores a byte string of length \fIcount\fR in the output string. Every character is taken as modulo 256 (i.e. the low byte of every character is used, and the high byte discarded) so when storing character strings not wholly expressible using the characters \\u0000-\\u00ff, @@ -80,7 +80,12 @@ formatted. For example, .CS \fBbinary format a7a*a alpha bravo charlie\fR .CE -will return a string equivalent to \fBalpha\\000\\000bravoc\fR. +will return a string equivalent to \fBalpha\\000\\000bravoc\fR and +.CS +\fBbinary format a* [encoding convertto utf-8 \\u20ac] +.CE +will return a string equivalent to \fB\\342\\202\\254\fR (which is the +UTF-8 byte sequence for a Euro-currency character). .RE .IP \fBA\fR 5 This form is the same as \fBa\fR except that spaces are used for @@ -434,11 +439,11 @@ reading bytes from the current position. The cursor is initially at position 0 at the beginning of the data. The type may be any one of the following characters: .IP \fBa\fR 5 -The data is a character string of length \fIcount\fR. If \fIcount\fR +The data is a byte string of length \fIcount\fR. If \fIcount\fR is \fB*\fR, then all of the remaining bytes in \fIstring\fR will be scanned into the variable. If \fIcount\fR is omitted, then one -character will be scanned. -All characters scanned will be interpreted as being in the +byte will be scanned. +All bytes scanned will be interpreted as being characters in the range \\u0000-\\u00ff so the \fBencoding convertfrom\fR command might be needed if the string is not an ISO 8859\-1 string. For example, |