Yes, the black-boxes in string editing are due to the fact that OPENSTRINGSTREAM fattens its strings to simplify its own character reading functions (maybe not a useful optimization). That’s just a bug. But separately, whether any string, or any string-sream, is fat or thin should not be visible at the user level.
The problem with the released Tedit is that it doesn’t have the proper flag set for these streams, and I haven’t wanted to go into that while I’m trying to revise a whole bunch of other stuff.
It is a different issue whether Tedit can be used to “edit” a string. The model is that a string-stream is just like a file-stream:
Tedit doesn’t actually modify a file as you do the edits, it effectively reads (“gets’”) the file-contents, and stores the modified contents back when you do a put, to a new version of the same name or to a file with a different name. So you essentially copy in, make changes, copy out. Until you do a put, the file is read-only (although the textstream is not.)
String-streams are the same way: you effectively copy the contents of the stream into Tedit, make changes like any other stream. Afterwards you can put the changes to a file, in the ordinary way.
What may seem counterintuitive, in the case of string-streams, is that you can’t directly “put” the modified characters back to the same string-datum (growing it or shrinking it in some way, but maintaining the same pointer).And you can’t see the changes in the string, if you kept a pointer to it, as you go along. But in that it is just like editing any other information source.
But there are two ways of getting a string that contains the character-sequence of any textstream, no matter what its original sources, the function COERCETEXTOBJ and TEDIT.SEL.AS.STRING, both of which are documented.
So:
(SETQ FOO (TEDIT (OPENTEXTSTREAM “abc”)) (or (TEDIT ‘{DSK}XXX.TEDIT))
edit edit edit
(COERCETEXTOBJ FOO ’STRING)
(in current released TEDIT you may have to pass (TEXTSTREAM FOO) instead of FOO—TEDIT returns the process handle)
I hope this is useful.