Skip to content

Instantly share code, notes, and snippets.

@jrockway
Created June 22, 2009 18:16
Show Gist options
  • Save jrockway/134105 to your computer and use it in GitHub Desktop.
Save jrockway/134105 to your computer and use it in GitHub Desktop.
perl -MEncode=encode -e 'my $str = "\x{eeffff}"; my $enc = encode("utf-16be", $str); print join q{,}, length $str, do { use bytes; length $enc }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment