Skip to content

Instantly share code, notes, and snippets.

@msouth
Created July 9, 2013 18:41
Show Gist options
  • Save msouth/5959998 to your computer and use it in GitHub Desktop.
Save msouth/5959998 to your computer and use it in GitHub Desktop.
double-encode some utf-8 stuff for artistically interesting output
use utf8;
use v5.10;
my $string = "áéíóú";
binmode(STDOUT, ":utf8");
say $string;
use Encode qw/encode decode/;
my $bob = encode( 'UTF-8', $string);
say $bob;
@msouth
Copy link
Author

msouth commented Jul 9, 2013

[msouth@foobry ~/work/utf8_test/utf8_thing ]$ perl test.pl
áéíóú
áéíóú

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment