Subject: | Utf8 flag on after decoding 100% ASCII data |
Hi Dan,
thanks for Encode, it's a great module! My collegue Richard Russo has
found a case where Encode decodes 100% ASCII data and subsequently sets
the utf8 flag:
my $string = "191501885";
my $id = decode_utf8( $string );
print "$id " , Encode::is_utf8($id), "\n";
$id = decode ( "utf8", $string );
print "$id " , Encode::is_utf8($id), "\n";
yields
191501885 1
191501885 1
while according to the documentation, strings that are 100% ascii
shouldn't have the utf8 flag on after they're utf8-decoded. Note that
the string contains a 100% ASCII string and not a number.
Would be great if you could take a look -- thanks!
-- Mike