in reply to Unicode and Forms
and maybe add the third arg to the decode call, so that it does something useful in case the input data turns out not to be valid utf8. See the section of the Encode man page headed "Handling Malformed Data": you can pass a "CHECK" parameter that says "die on error", and wrap the decode call in an eval block to see whether it worked, before moving on to doing regex matches involving unicode character classes.my $utf8_param = decode( 'utf8', $input_param );
(If you don't check the result of the decode call, parts that it couldn't decode will show up as "\x{FFFD}", which would be "safe", but not very informative in terms of diagnostics.)
|
|---|