View in color | License | Download script | History | Other scripts by: carl |
30-Apr 14:29 UTC
[0.042] 10.299k
[0.042] 10.299k
findchars.rREBOL [
Title: "Find Invalid Chars"
Date: 4-Jun-1998
File: %findchars.r
Author: "Carl Sassenrath"
Purpose: "Finds odd unprintable ASCII characters in a file"
library: [
level: 'intermediate
platform: none
type: none
domain: [file-handling text-processing]
tested-under: none
support: none
license: none
see-also: none
]
]
bad-chars: complement charset ["^I^J^M" #" " - #"~"]
file: to-file ask "Filename? "
data: read/binary file
forall data [
if find bad-chars first data [
print ["Bad char at" index? data]
print mold to-string copy/part data 10
]
] |