Browse Source

Don't (mis)use tr/// to remove non-printables

Turns out tr/// *does not support POSIX classes* at all.  This command
could not have ever worked.  (schroedinbug).
Alois Mahdal 5 years ago
parent
commit
b1f3060143
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/include-sh/coerce.sh

+ 1
- 1
src/include-sh/coerce.sh View File

27
     #
27
     #
28
     # Remove non-printable characters
28
     # Remove non-printable characters
29
     #
29
     #
30
-    perl -CS -Mutf8 -pe 'tr|[:graph:]\n\t ||c;'
30
+    perl -CS -Mutf8 -pe "s|[^[:graph:] \t\n]||g"
31
 }
31
 }
32
 
32
 
33
 coerce__nofdraw() {
33
 coerce__nofdraw() {