http://qs321.pair.com?node_id=377109


in reply to Re^2: utf weirdness in regex
in thread utf weirdness in regex

Of course, when using FB_CROAK as the CHECK argument, you normally want to wrap it in an eval:
my $encoding = "whatever"; my $octets = "characters in whatever encoding..."; eval '$_ = decode( $encoding, $octets, Encode::FB_CROAK )'; if( $@ ) { report_an_error(); ... }