summaryrefslogtreecommitdiffstats
path: root/doc/binary.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2021-11-07 04:25:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2021-11-07 04:25:39 (GMT)
commit084b76b92a5ec029401f05a4138c1559602c23e7 (patch)
treef8029c86dca73799a108275dc5a45f17b571744c /doc/binary.n
parent08ffe0305990c426e94a6cee8ba3739d8a8c2ab6 (diff)
downloadtcl-084b76b92a5ec029401f05a4138c1559602c23e7.zip
tcl-084b76b92a5ec029401f05a4138c1559602c23e7.tar.gz
tcl-084b76b92a5ec029401f05a4138c1559602c23e7.tar.bz2
Updates to TIP 568 implementation for Tcl 9:
Use the argument numBytes instead of length. Update the docs to the TIP spec. Clarify and simplify the code.
Diffstat (limited to 'doc/binary.n')
-rw-r--r--doc/binary.n11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/binary.n b/doc/binary.n
index 9ab694e..1a62ad6 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -44,8 +44,9 @@ the range \eu0000\-\eu00FF.
When encoding binary data as a readable string, the starting binary data is
passed to the \fBbinary encode\fR command, together with the name of the
encoding to use and any encoding-specific options desired. Data which has been
-encoded can be converted back to binary form using \fBbinary decode\fR. The
-following formats and options are supported.
+encoded can be converted back to binary form using \fBbinary decode\fR.
+The \fBbinary encode\fR command raises an error if the \fIdata\fR argument
+is not binary data. The following formats and options are supported.
.TP
\fBbase64\fR
.
@@ -607,9 +608,9 @@ will return
.PP
The \fBbinary scan\fR command parses fields from a binary string,
returning the number of conversions performed. \fIString\fR gives the
-input bytes to be parsed (one byte per character, and characters not
-representable as a byte have their high bits chopped)
-and \fIformatString\fR indicates how to parse it.
+input bytes to be parsed and \fIformatString\fR indicates how to parse it.
+An error is raised if \fIstring\fR is anything other than a valid binary
+data value.
Each \fIvarName\fR gives the name of a variable; when a field is
scanned from \fIstring\fR the result is assigned to the corresponding
variable.