diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Utf.3 | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -133,9 +133,10 @@ represent one Unicode character in the UTF-8 representation. \fBTcl_UniCharToUtf\fR stores the character \fIch\fR as a UTF-8 string in starting at \fIbuf\fR. The return value is the number of bytes stored in \fIbuf\fR. If ch is a high surrogate (range U+D800 - U+DBFF), then -the return value will be 0 and nothing will be stored. If you still -want to produce UTF-8 output for it (even though knowing it's an illegal -code-point on its own), just call \fBTcl_UniCharToUtf\fR again using ch = -1. +the return value will be 1 and a single byte in the range 0xF0 - 0xF4 +will be stored. If you still want to produce UTF-8 output for it (even +though knowing it's an illegal code-point on its own), just call +\fBTcl_UniCharToUtf\fR again specifying ch = -1. .PP \fBTcl_UtfToUniChar\fR reads one UTF-8 character starting at \fIsrc\fR and stores it as a Tcl_UniChar in \fI*chPtr\fR. The return value is the |