This diff creates a new string for every *character* of the message, I think replace() would be a win for both simplicity and performance.  You can use a replace() regex for the unicode ranges.