diff options
Diffstat (limited to 'localkannel-dispatch')
-rwxr-xr-x | localkannel-dispatch | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/localkannel-dispatch b/localkannel-dispatch index c967368..bb5a7c0 100755 --- a/localkannel-dispatch +++ b/localkannel-dispatch @@ -24,21 +24,17 @@ grepescape() { # Based on Text::Unidecode bug#8017: http://rt.cpan.org/Ticket/Display.html?id=8017#txn-322351 lctransliterate() { - echo "$1" | perl -n \ - -e 'use Text::Unidecode;' \ - -e 'use Encode 2.12 qw(encode decode _utf8_off);' \ + echo "$1" | perl -MText::Unidecode -MEncode \ -e 'print lc(decode("GSM0338", encode("GSM0338", decode("UTF-8", $_),' \ - -e 'sub {$a=unidecode(chr $_[0]); _utf8_off($a); $a;}' \ + -e 'sub {$a=unidecode(chr $_[0]); Encode::_utf8_off($a); $a;}' \ -e ')));' - - return $res; } uriunescape() { if [ 0 = "$urldecode" ]; then echo "$@" else - echo "$@" | perl -e 'use URI::Escape; print lc(uri_unescape(<STDIN>));' + echo "$@" | perl -MURI::Escape -ne 'print lc(uri_unescape($_))' fi } |