|
@@ -25,9 +25,12 @@ coerce__nocolor() {
|
25
|
25
|
|
26
|
26
|
coerce__noctl() {
|
27
|
27
|
#
|
28
|
|
- # Remove non-printable characters
|
|
28
|
+ # Replace non-printable characters with $COERCE__REPCHAR
|
29
|
29
|
#
|
30
|
|
- perl -CS -Mutf8 -pe 'tr|[:graph:]\n\t ||c;'
|
|
30
|
+ # Keep only characters that have grapgical representation ([:graph:] POSIX
|
|
31
|
+ # class), newline, tab and space. Replace rest with $COERCE__REPCHAR.
|
|
32
|
+ #
|
|
33
|
+ perl -CS -Mutf8 -pe "s|[^[:graph:] \t\n]|$COERCE__REPCHAR|g"
|
31
|
34
|
}
|
32
|
35
|
|
33
|
36
|
coerce__nofdraw() {
|