Browse Source

Enable (assume) UTF-8 in saturnin_urimagic

Alois Mahdal 8 years ago
parent
commit
9e2ff2f57e
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      src/ffoo/saturnin_urimagic.sh

+ 4
- 4
src/ffoo/saturnin_urimagic.sh View File

86
     # Hack expressions like bug = 123 out of the text
86
     # Hack expressions like bug = 123 out of the text
87
     #
87
     #
88
     sed -e 's/(\d)\</\n/;' \
88
     sed -e 's/(\d)\</\n/;' \
89
-      | perl -ne '
89
+      | perl -CS -ne '
90
             next unless m/\b([a-zA-Z]\w*\s*=\s*\w+)\b/;
90
             next unless m/\b([a-zA-Z]\w*\s*=\s*\w+)\b/;
91
             print "$1\n";
91
             print "$1\n";
92
         ' \
92
         ' \
99
     # Hack doer-like id's (ID#123) out of the text
99
     # Hack doer-like id's (ID#123) out of the text
100
     #
100
     #
101
     tr ' ' '\n' \
101
     tr ' ' '\n' \
102
-      | perl -ne '
102
+      | perl -CS -ne '
103
             next unless m/\b([a-zA-Z]\w*#\w+)\b/;
103
             next unless m/\b([a-zA-Z]\w*#\w+)\b/;
104
             print "$1\n";
104
             print "$1\n";
105
         ' \
105
         ' \
127
     # Hack URIs out of the text.
127
     # Hack URIs out of the text.
128
     #
128
     #
129
     tr ' ' '\n' \
129
     tr ' ' '\n' \
130
-      | perl -ne '
131
-            next unless m|(\bhttps?://[[:alnum:]_:/.?#&+,%@=;~-]+)\b|;
130
+      | perl -CS -ne '
131
+            next unless m|(\bhttps?://[[:alnum:]_:/.?#&+,%@=;~-]+)\b|u;
132
             print "$1\n";
132
             print "$1\n";
133
         '
133
         '
134
 }
134
 }