Subject: | clears utf-8 flag |
The following test file illustrates the problem. Any scalar flagged as
utf8 and then passed into the md5* functions loses the utf8 flag.
use Test::More tests => 2;
use Encode qw(is_utf8 _utf8_on);
use Digest::MD5 qw(md5 md5_hex md5_base64);
{
my $str = "abcd";
_utf8_on($str);
ok(is_utf8($str), 'utf8 flag set before md5');
my $md5 = md5($str);
ok(is_utf8($str), 'utf8 flag set after md5');
}