Overview
| Artifact ID: | bad49f4cff8c07a594a033f9dc3206723f02a313 |
|---|---|
| Ticket: | 411825ffffffffffffffffffffffffffffffffff
Passing list w/UTF-8 from C can fail |
| User & Date: | dkf on 2001-09-18 21:34:28 |
Changes
- closedate changed to: "2001-09-18T14:34:28"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Jeff just happens to be wrong. :^) The example code contains valid UTF-8 strings. The problem is that TclNeedsSpace doesn't know anything about UTF-8 and therefore anything depending on it (Tcl_AppendElement, Tcl_DStringAppendElement and Tcl_DStringStartSublist says a search with grep, plus goodness knows how much in extensions as the code is in the stub table) is *not* UTF-8 safe. Unfortunately, none of those three public functions (two of which are not deprecated at all) warns in its documentation that it is unsafe to pass UTF-8 strings to it. :^( The problems in TclNeedSpace are really the 'end--' which is fundamentally wrong on UTF-8 strings, and the way it detects what character it is looking at which needs to be much more careful when looking at bytes outside \000-\177. Plus isspace is not usually Unicode-aware...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"