diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-09 15:19:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-04-09 15:19:51 (GMT) |
commit | aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49 (patch) | |
tree | 3437f219dfea47d335f00237bd046b9a809c3a7f /doc/string.n | |
parent | 1f4a8eb5d1a8d6fddf8571fc5694d3b527799df6 (diff) | |
download | tcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.zip tcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.tar.gz tcl-aa4f7bcd47ef35e83a3a5a6c3f16398bf3758e49.tar.bz2 |
Deprecate/remove "string bytelength"
Diffstat (limited to 'doc/string.n')
-rw-r--r-- | doc/string.n | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/string.n b/doc/string.n index 7cd53ca..f1a0592 100644 --- a/doc/string.n +++ b/doc/string.n @@ -404,7 +404,7 @@ Formally, the \fBstring bytelength\fR operation returns the content of the \fIlength\fR field of the \fBTcl_Obj\fR structure, after calling \fBTcl_GetString\fR to ensure that the \fIbytes\fR field is populated. This is highly unlikely to be useful to Tcl scripts, as Tcl's internal -encoding is not strict UTF\-8, but rather a modified CESU\-8 with a +encoding is not strict UTF\-8, but rather a modified WTF\-8 with a denormalized NUL (identical to that used in a number of places by Java's serialization mechanism) to enable basic processing with non-Unicode-aware C functions. As this representation should only @@ -413,13 +413,13 @@ store the representation is of very low value (except to C extension code, which has direct access for the purpose of memory management, etc.) .PP -\fICompatibility note:\fR it is likely that this subcommand will be -withdrawn in a future version of Tcl. It is better to use the -\fBencoding convertto\fR command to convert a string to a known -encoding and then apply \fBstring length\fR to that. +\fICompatibility note:\fR This subcommand is deprecated and will +be removed in Tcl 9.0. It is better to use the \fBencoding convertto\fR +command to convert a string to a known encoding (e.g. "wtf-8" or "tcl-8") +and then apply \fBstring length\fR to that. .PP .CS -\fBstring length\fR [encoding convertto utf-8 $theString] +\fBstring length\fR [encoding convertto wtf-8 $theString] .CE .RE .TP |