Seems like a another possible fix would be to change the best fit mapping table to never generate control characters, but only alphanumerics. So map quote-like characters to 'q' and so on.
This might be uglier and slightly change behaviour, but only for vulnerable applications.