Just wondering...
Instead of deleting those "undesirable" characters, could we replace with a character of our choice?
Hum.... how about replacing each undesirable character with another one (if defined) otherwise replaced with a common character ('')