// Zap Gremlins // // This macro removes non-printing characters // (e.g., carriage returns and tabs) from a text file. // In v1.39f, only the first 5,000 bytes are processed // if the file name does not end in ".txt". In 1.39g and // later, the first 100,000 bytes are processed, or use the // optional second argument to File.openAsRawString() specify // the limit. For example, File.openAsRawString("", 500000) // opens files up to 500,000 bytes in length. requires("1.39f"); LF=10; TAB=9; s1 = File.openAsRawString(""); n = lengthOf(s1); String.resetBuffer; for (i=0; i=32 && c<=127) String.append(fromCharCode(c)); } s2 = String.buffer; print("\\Clear"); print( s2);