3 ms·
It's been a while, but my recollection is that the Tcl interpreter stores strings as fixed-width code points, and uses 16 bit characters by default, so it's eff
by spijdar 3y ago
It's been a while, but my recollection is that the Tcl interpreter stores strings as fixed-width code points, and uses 16 bit characters by default, so it's effectively UCS-2 (hence being limited to the first 65536 characters).
This is configurable, though -- I recall it was a preprocessor define in the C code, and you can change it to 32 bits per character, making it UTF-32. Of course, this won't help a Tcl script run somewhere else, but it means you _can_ build a Tcl interpreter that transparently works with "all unicode", at the cost of doubling memory consumption for every string.
All this is concerning the internal string format, not what it accepts as input/output.