in reply to Re^7: Getting mad with CGI::Application and utf8
in thread Getting mad with CGI::Application and utf8
Let me repeat the question
Do you expect me to repeat the answer too? :)
If your subroutine or module specifically only handles binary strings, I'd recommend documenting it as such, and downgrading the string that you receive:
That's more or less what Perl does in its binary operators, like print.
my $copy = $foo;
utf8::downgrade($copy) or utf8::encode($copy) && carp "Wide character
Whatever you do, though, never assume that the absence of the flag means it's not a text string!