Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bb1a259858cd988489493736531ec5c79ff931298a6030bb1aab0e7c8d695a9b
Ticket: 7f1162a8674cc65c9b72169818badc3186f97678
concatenation does not make usable surrogate pairs
User & Date: sebres on 2021-04-12 13:21:17
Changes

  1. icomment:
    Really Jan?!
    
    Are you sure that the result of such utf-string concatenation must be "foozoo" (so dual encoded C080) and not like in every Tcl version before "foo\0zoo"?
    
    Imagine you get two strings from somewhere operating with internal tcl-utf string (something acting like a channel with internal utf-encoding like strchan, memchan-similar thing and co. or whatever else generating string in chunks with undefined <b>but fixed</b> length)...<br/>
    Getting 2 chunks from there where at range of 2 "buffers" would be <code>..C0][80..</code>
    would either expect some look-ahead (if it is possible at all) or binary reading (if it is possible too) with finally conversion to tcl utf-string (like encoding convertfrom) or some other handling.<br/>
    Just what is especially brilliant thereby, that the buffer- or chunk-size are extremely crucial now.<br/>
    So like here: getting a string (again utf-string, not a bytearray) "foo\0zoo" in two chunks with "buffer" size 4 could produce "foozoo" at another end, where doing the same with "buffer" size 8 would get it as "foo\0zoo" as single string.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"