diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-04-20 10:18:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-04-20 10:18:29 (GMT) |
commit | 0569fc46c844408dcdfbdeda711a3395967cb412 (patch) | |
tree | 64da1872a9c17cbb242d302c9f47f115664f156c /doc | |
parent | 697d8c5398b041a3584259d54b99bc7027b2588a (diff) | |
parent | ca5638e01f9fc9f3371e252ceb9f4c1cb6144c09 (diff) | |
download | tcl-0569fc46c844408dcdfbdeda711a3395967cb412.zip tcl-0569fc46c844408dcdfbdeda711a3395967cb412.tar.gz tcl-0569fc46c844408dcdfbdeda711a3395967cb412.tar.bz2 |
merge 8.7
Diffstat (limited to 'doc')
-rw-r--r-- | doc/StringObj.3 | 5 | ||||
-rw-r--r-- | doc/ToUpper.3 | 6 | ||||
-rw-r--r-- | doc/Utf.3 | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/doc/StringObj.3 b/doc/StringObj.3 index cca5014..fed362c 100644 --- a/doc/StringObj.3 +++ b/doc/StringObj.3 @@ -37,7 +37,7 @@ Tcl_UniChar * Tcl_UniChar * \fBTcl_GetUnicode\fR(\fIobjPtr\fR) .sp -Tcl_UniChar +int \fBTcl_GetUniChar\fR(\fIobjPtr, index\fR) .sp int @@ -201,7 +201,8 @@ where the caller does not need the length of the unicode string representation. .PP \fBTcl_GetUniChar\fR returns the \fIindex\fR'th character in the -value's Unicode representation. +value's Unicode representation. If the index is out of range or +it references a low surrogate preceded by a high surrogate, it returns -1; .PP \fBTcl_GetRange\fR returns a newly created value comprised of the characters between \fIfirst\fR and \fIlast\fR (inclusive) in the diff --git a/doc/ToUpper.3 b/doc/ToUpper.3 index be614e7..1c7a0c2 100644 --- a/doc/ToUpper.3 +++ b/doc/ToUpper.3 @@ -13,13 +13,13 @@ Tcl_UniCharToUpper, Tcl_UniCharToLower, Tcl_UniCharToTitle, Tcl_UtfToUpper, Tcl_ .nf \fB#include <tcl.h>\fR .sp -Tcl_UniChar +int \fBTcl_UniCharToUpper\fR(\fIch\fR) .sp -Tcl_UniChar +int \fBTcl_UniCharToLower\fR(\fIch\fR) .sp -Tcl_UniChar +int \fBTcl_UniCharToTitle\fR(\fIch\fR) .sp int @@ -63,7 +63,7 @@ const char * const char * \fBTcl_UtfPrev\fR(\fIsrc, start\fR) .sp -Tcl_UniChar +int \fBTcl_UniCharAtIndex\fR(\fIsrc, index\fR) .sp const char * @@ -140,6 +140,9 @@ number of bytes read from \fIsrc\fR. The caller must ensure that the source buffer is long enough such that this routine does not run off the end and dereference non-existent or random memory; if the source buffer is known to be null-terminated, this will not happen. If the input is +a byte in the range 0x80 - 0x9F, \fBTcl_UtfToUniChar\fR assumes the +cp1252 encoding, stores the corresponding Tcl_UniChar in \fI*chPtr\fR +and returns 1. If the input is otherwise not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and 0x00ff and return 1. |