parsed.org

Tips by tag: non-printable

You can use tr to remove non-printable characters from a data stream:

$ tr -cd '\11\12\40-\176' < $INPUT_FILE > $OUTPUT_FILE

(This tip taken from http://www.devdaily.com/unix/edu/un010011/.)

charactersconvertfilternon-printableshelltr

You can use PHP's trim function to remove non-printable characters:

$string = trim($string, "\x7f..\xff\x0..\x1f");
charactersfunctionslanguagesnon-printablephpprogrammingtrim
RSS