Magic text cleaner for iOS coders

Printer-friendly versionSend to friendPDF version

Dirty text. No one likes it, but it happens. Mysterious errors from code that looks perfect. I had wasted a lot of time copying and pasting text from places like php.net into Textastic and having the code not work at all. It turns out when I copy the text in Safari, it is grabbing characters that php does not like. Unfortunately there seems to be no text cleaners out there at all for iOS. I considered bugging the developer of Textastic for a feature BBEdit has called "Zap Gremlins", but I didn't. I may bug him to add a feature later, but for now I have made this work-around.

This simple utility is intended to provide basic text cleaning. It essentially takes any character with a unicode value above 128 and replaces it with a space.

Just paste your troublesome text into the handy text area and click "Clean". Then copy the text back out and paste into your text editor.



Comments

j1msh4w's picture

Nice regexp!

I deem this useful.

Robert Ritchie's picture

Samples?

This is pretty cool. I would suggest you add a link to some "bad" code so that I can easily test how this works. (I don't often copy-and-paste code because I'm such a great programmer I don't have to do that...yeah, RIGHT!)

Tim's picture

Handy

Very handy, you find the coolest stuff. thanks