summaryrefslogtreecommitdiffstats
path: root/doc/Encoding.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/Encoding.3')
-rw-r--r--doc/Encoding.323
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index c357ecd..c94f000 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -232,12 +232,12 @@ be used to specify the profile to be used for the transform. The
ignored as the function assumes the entire source string to be decoded is passed
into the function. On success, the function returns \fBTCL_OK\fR with the
converted string stored in \fB*dstPtr\fR. For errors \fIother than conversion
-errors\fR, such as invalid flags, the function returns \fBTCL_ERROR\fR with an error
-message in \fBinterp\fR if it is not NULL.
+errors\fR, such as invalid flags, the function returns \fBTCL_ERROR\fR with an
+error message in \fBinterp\fR if it is not NULL.
For conversion errors, \fBTcl_ExternalToUtfDStringEx\fR returns one
of the \fBTCL_CONVERT_*\fR errors listed below for \fBTcl_ExternalToUtf\fR.
-When one of these conversion errors is returned, an error message is
-stored in \fBinterp\fR only if \fBerrorIdxPtr\fR is NULL. Otherwise, no error message
+When one of these conversion errors is returned, an error message is stored
+in \fBinterp\fR only if \fBerrorIdxPtr\fR is NULL. Otherwise, no error message
is stored as the function expects the caller is interested the decoded data
up to that point and not treating this as an immediate error condition.
The index of the error location is stored in \fB*errorIdxPtr\fR.
@@ -266,8 +266,8 @@ the unconverted bytes that remained in \fIsrc\fR plus some further bytes
from the source stream to properly convert the formerly split-up multibyte
sequence.
.IP \fBTCL_CONVERT_SYNTAX\fR 29
-The source buffer contained an invalid byte or character sequence. This may occur
-if the input stream has been damaged or if the input encoding method was
+The source buffer contained an invalid byte or character sequence. This may
+occur if the input stream has been damaged or if the input encoding method was
misidentified.
.IP \fBTCL_CONVERT_UNKNOWN\fR 29
The source buffer contained a character that could not be represented in
@@ -284,11 +284,12 @@ encoding, a default fallback character will be used. The return value is
a pointer to the value stored in the DString.
.PP
\fBTcl_UtfToExternalDStringEx\fR is an enhanced version of
-\fBTcl_UtfToExternalDString\fR that transforms UTF-8 encoded source data to a specified
-\fIencoding\fR. Except for the direction of the transform, the parameters and
-return values are identical to those of \fBTcl_ExternalToUtfDStringEx\fR. See
+\fBTcl_UtfToExternalDString\fR that transforms UTF-8 encoded source data to a
+specified \fIencoding\fR. Except for the direction of the transform, the
+parameters and return values are identical to those of
+\fBTcl_ExternalToUtfDStringEx\fR. See
that function above for details about the same.
-
+.PP
Irrespective of the return code from the function, the caller must free
resources associated with \fB*dstPtr\fR when the function returns.
.PP
@@ -364,7 +365,7 @@ about the name of the encoding and the procedures that will be called to
convert between this encoding and UTF-8. It is defined as follows:
.PP
.CS
-typedef struct Tcl_EncodingType {
+typedef struct {
const char *\fIencodingName\fR;
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;