summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-17 13:44:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-17 13:44:04 (GMT)
commit25473372703a8ba0a8bba93c36afad63b8a9e2f6 (patch)
tree55a8af5f981022aa7202006bd5d7bb3a626e2182 /doc
parentfb7684bbbf09e0c6e6328056be102e5069ab600f (diff)
parent7056164cd356e6aed9a9290471a7029c35a606f5 (diff)
downloadtcl-25473372703a8ba0a8bba93c36afad63b8a9e2f6.zip
tcl-25473372703a8ba0a8bba93c36afad63b8a9e2f6.tar.gz
tcl-25473372703a8ba0a8bba93c36afad63b8a9e2f6.tar.bz2
Merge 9.0
Diffstat (limited to 'doc')
-rw-r--r--doc/Encoding.321
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index c36744b..663cd3f 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -25,9 +25,15 @@ int
char *
\fBTcl_ExternalToUtfDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
+size_t
+\fBTcl_ExternalToUtfDStringEx\fR(\fIencoding, src, srcLen, flags, dstPtr\fR)
+.sp
char *
\fBTcl_UtfToExternalDString\fR(\fIencoding, src, srcLen, dstPtr\fR)
.sp
+size_t
+\fBTcl_UtfToExternalDStringEx\fR(\fIencoding, src, srcLen, flags, dstPtr\fR)
+.sp
int
\fBTcl_ExternalToUtf\fR(\fIinterp, encoding, src, srcLen, flags, statePtr,
dst, dstLen, srcReadPtr, dstWrotePtr, dstCharsPtr\fR)
@@ -96,7 +102,10 @@ byte is converted and then to reset to an initial state.
\fBTCL_ENCODING_STOPONERROR\fR signifies that the conversion routine should
return immediately upon reading a source character that does not exist in
the target encoding; otherwise a default fallback character will
-automatically be substituted.
+automatically be substituted. The flag \fBTCL_ENCODING_NOCOMPLAIN\fR has
+no effect, it is reserved for Tcl 9.0. The flag \fBTCL_ENCODING_MODIFIED\fR makes
+\fBTcl_UtfToExternalDStringEx\fR and \fBTcl_UtfToExternal\fR produce the
+byte sequence \exC0\ex80 in stead of \ex00, for the utf-8/cesu-8 encoders.
.AP Tcl_EncodingState *statePtr in/out
Used when converting a (generally long or indefinite length) byte stream
in a piece-by-piece fashion. The conversion routine stores its current
@@ -196,6 +205,11 @@ When converting, if any of the characters in the source buffer cannot be
represented in the target encoding, a default fallback character will be
used. The return value is a pointer to the value stored in the DString.
.PP
+\fBTcl_ExternalToUtfDStringEx\fR is the same as \fBTcl_ExternalToUtfDString\fR,
+but it has an additional flags parameter. The return value is the index of
+the first byte in the input string causing a conversion error.
+Or (size_t)-1 if all is OK.
+.PP
\fBTcl_ExternalToUtf\fR converts a source buffer \fIsrc\fR from the specified
\fIencoding\fR into UTF-8. Up to \fIsrcLen\fR bytes are converted from the
source buffer and up to \fIdstLen\fR converted bytes are stored in \fIdst\fR.
@@ -234,6 +248,11 @@ characters in the source buffer cannot be represented in the target
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 the same as \fBTcl_UtfToExternalDString\fR,
+but it has an additional flags parameter. The return value is the index of
+the first byte of an utf-8 byte-sequence in the input string causing a
+conversion error. Or (size_t)-1 if all is OK.
+.PP
\fBTcl_UtfToExternal\fR converts a source buffer \fIsrc\fR from UTF-8 into
the specified \fIencoding\fR. Up to \fIsrcLen\fR bytes are converted from
the source buffer and up to \fIdstLen\fR converted bytes are stored in