http://qs321.pair.com?node_id=1016653


in reply to minimalist perl-utf8 question

You need to mark STDOUT as being in UTF-8. Either binmode ..., ":encoding(UTF-8)"; or the slightly cryptic perl -C2 option will work:

$ perl -wE 'use utf8; binmode STDOUT, ":encoding(UTF-8)"; print "ייייי + ", length "ייייי", "\n";'

prints

ייייי 5

$ perl -C2 -wE 'use utf8; print "ייייי ", length "ייייי", "\n";'

prints

ייייי 5