Skip to content

Instantly share code, notes, and snippets.

@ywindish
Created April 10, 2019 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ywindish/af8580973ca9487c25c78d338a4285bf to your computer and use it in GitHub Desktop.
Save ywindish/af8580973ca9487c25c78d338a4285bf to your computer and use it in GitHub Desktop.
Perl one-liner: Unicode code point converted to a character
# perl -MEncode -e 'my $str="\x{4ee4}";print Encode::encode("utf-8", $str);print "\n"'
# => 令
# perl -MEncode -e 'my $str="\x{f9a8}";print Encode::encode("utf-8", $str);print "\n"'
# => 令
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment