diff --git a/utf8/SecUtf8.pm b/utf8/SecUtf8.pm index 8595a7e..f10364f 100644 --- a/utf8/SecUtf8.pm +++ b/utf8/SecUtf8.pm @@ -46,7 +46,9 @@ sub match { @matches = map { Encode::encode('UTF-8', $_) } @matches; # return the array @matches, so that its elements would be mapped to - # SEC match variables $1, $2, ... + # SEC match variables $1, $2, etc. (since Perl wide characters are not + # returned from this function, it will avoid Perl warnings and errors + # when Perl wide characters are written to outputs like files and sockets) return @matches; } diff --git a/utf8/test-utf8.sec b/utf8/test-utf8.sec index 1de0887..b48e378 100644 --- a/utf8/test-utf8.sec +++ b/utf8/test-utf8.sec @@ -23,8 +23,8 @@ action=eval %o (require "/etc/sec/perl/SecUtf8.pm"); \ # Note that before returning values of match variables, the SecUtf8::match() # function converts Perl wide characters back to UTF-8 multibyte characters # in returned values, and thus the $1 and $2 match variables will hold values -# in UTF-8 encoding (that will avoid warnings and errors from Perl when Perl -# wide characters are written to various outputs like files and sockets). +# in UTF-8 encoding (that will avoid Perl warnings and errors when Perl wide +# characters are written to outputs like files and sockets). type=Single ptype=PerlFunc