The last printed character should be written over with a number of blanks corresponding to the length of the character's UInt8 transcode. If this value is not consistent for all values in the string, only the external program will know the value for the currently printed character. Unfortunately, it cannot handle the cleanup after a kill signal is sent, even with try; finally; end. So, the main process has to handle it. Maybe the simplest way is to enforce that characters have the same transcode length, or to print blanks to make it even. Otherwise, additional communication between processes might need to be added.
The last printed character should be written over with a number of blanks corresponding to the length of the character's UInt8 transcode. If this value is not consistent for all values in the string, only the external program will know the value for the currently printed character. Unfortunately, it cannot handle the cleanup after a
kill
signal is sent, even withtry; finally; end
. So, the main process has to handle it. Maybe the simplest way is to enforce that characters have the same transcode length, or to print blanks to make it even. Otherwise, additional communication between processes might need to be added.