perl -e' binmode(STDOUT, ":encoding(UTF-8)"; $text="\x{00fc}"; say length($text); say $text; ' #### perl -MEncode -e' $text="\x{00fc}"; $bytes=encode("UTF-8", $text); say encode("UTF-8", length($bytes)); say $bytes; '