http://www.perlmonks.org?node_id=1043601


in reply to utf8::is_utf8 valid introspection?

If you need to work around a bug, just use

utf8::upgrade($var);

or

utf8::downgrade($var);

to get the the string in the expected storage format (regardless of the current storage format).

The only use I can think of for utf8::is_utf8 is for debugging, but I use Devel::Peek's Dump when I want to peek at a scalar's internals.