But it does understand the control characters like the #9 for tab which works btw
It would be possible to modify the text prior to adding to the TMemo by taking the input string from wherever it is created and replacing each instance of (for example)
Space (32) with underscore '_' char(95)
Tab (9) with Tilde '~' char(126)
LineFeed (10) with Exclamation '!' char(33)
Return (13) with Octothorpe '#' char(35)
Or even more readable, 9 with '[TAB]', 10 with '[LF]', 13 with '[RET]' - there would be little point in using '[SP]' when the underscore works very well for space.
It would be a simple Find & Replace exercise.