Overview
| Artifact ID: | 065ebad0f95d319444efa6963d5ca743eb83e00030c30e2d059b243f6fd2bfa6 |
|---|---|
| Ticket: | 31aa44375de2c87ecb1361b15ca0102d831ad155
Tcl_NumUtfChars regression in default 8.6 build |
| User & Date: | jan.nijtmans on 2020-04-05 21:00:38 |
Changes
- icomment:
Well, first remark: Tcl 9.0 gives the right answere here: % lmap i {0 1 2 3 4} {testnumutfchars [testbytestring \xf0\x9f\x92\xa9] $i} 0 1 2 3 1 But ... for Tcl 8.x, we consider 4-byte sequences as consisting on 2 surrogates. So, there the correct answer should be: % lmap i {0 1 2 3 4} {testnumutfchars [testbytestring \xf0\x9f\x92\xa9] $i} 0 1 2 3 2 You are correctly noticing that Tcl_UtfCharComplete() does not always match with Tcl_UtfToUniChar: Sometimes only 1 byte is demanded, but Tcl_UtfToUniChar() still reads 3 bytes. That's corrected in [166c0270e7812ba4 now. That change changes your test-case into the right answer. Still, the documentation needs to be adapted explaining why this is the right answer. So, I'm not closing this ticket yet. - login: "jan.nijtmans"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Pending"