Here is the official 3.14 reference. I agree something is fishy, but I think the fishiness is a separate issue.
After an hour of futzing, the following Leonine script works as expected:
g.cls()
table = (
'Test1',
'Test2' + chr(7),
)
delete_s = ''.join(chr(i) for i in range(20) if not chr(i).isprintable())
print(repr(delete_s))
for s in table:
trans_table = str.maketrans('', '', delete_s)
print(repr(s), repr(s.translate(trans_table)))
The output is:
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13'
'Test1' 'Test1'
'Test2\x07' 'Test2'
Oops. The delete string deletes too many characters, but it's getting close.
I'll create a PR based on this idea. For now, though, I think this issue is not the cause of Thomas's woes.
Edward