encoding produces the opposite result.
#use encoding 'UTF-8'; # or 'utf8' #use utf8; use Encode qw( is_utf8 ); sub ff { print is_utf8($_[0]) ? 1 : 0, "\n"; } # none enco utf8 both # ---- ---- ---- ---- ff("asd"); # 0 1 0 1 ff('asd'); # 0 1 0 1 ff(qw(asd)); # 0 1 0 1 ff(asd => 1); # 0 0 1 1 { no strict; ff(asd); } # 0 0 1 1 ff(-asd); # 0 0 1 1 ff(asd::); # 0 0 1 1
In reply to Re^2: Unexpected utf8 in hash keys (encoding)
by ikegami
in thread Unexpected utf8 in hash keys
by kappa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |