That will almost certainly preserve the invisible characters. Most invisible characters are used for some kind of in-line formatting in Unicode, so it's not desirable to remove them.
I've already got a script running every 2500 milliseconds to strip leading and trailing whitespace, HTML, and non-ASCII characters except for the UTF-8 characters of our local language.