Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-11-13
11:18 • Closed ticket [480128ffff]: Add UtfCount() to the public API plus 6 other ch... artifact: 51b1d9f05b user: serhiy.storchaka
2003-11-13
06:01 • Ticket [480128ffff]: 1 change artifact: 1e51b55ec7 user: dgp
2001-11-09
18:55 • New ticket [480128ffff]. artifact: d08e54b383 user: nobody

Add UtfCount() to the public API

Closed / Wont Fix480128ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 20 days ago
Descriptionplain2001-11-09 18:55:04
C extension authors may occasional need to know, how
byte long a utf-8 char is. Although it isn't
complicated  to write code, that does this, it's a bit
annoying, because the tcl core has already code, that
does this: UtfCount() in generic/tclUtf.c.
dgp Ticket [480128ffff]: 1 change [History diff]2003-11-13 06:01:15
serhiy.storchakawiki2026-11-13 11:18:44

The public API already covers this: Tcl_UniCharToUtf returns the UTF-8 length of a character, and Tcl_UtfToUniChar or Tcl_UtfNext give the byte length of a character in a UTF-8 string, so there is no need to export the internal TclUtfCount().

Log in (anonymous is fine) to add a comment.