use strict;
use vars qw( $utf8 );
# UTF8 must escape all characters except: - & @ _ ; . = \ a-z A-Z 0-9
$utf8 = qr/[^\055\046\0100\0137\073\056\075\0134 a-zA-Z 0-9]/;
sub utf8 {
my($str) = join('',@_) || return('');
$str =~ s/($utf8)/sprintf('%%%02X',ord($1))/ego; $str =~ s/ /+/gm; $str;
}
print( utf8(@ARGV) );