Exactly the module I needed, with a name that matched my search request on CPAN.
This is the module to use when you have to clean dirty data.
In my case I could not use PerlIO to directly load UTF-8 text from a file because I had to process the data through a regexp and my Perl has a bug in the Regexp engine. As a workaround I load text as binary, parse it with Regexp::Grammars, and feed the result tree to Data::Recursive::Encode.
(For details of the Perl bug, see rt.cpan.org/Public/Bug/Display.html?i... )