Created
July 9, 2013 18:41
-
-
Save msouth/5959998 to your computer and use it in GitHub Desktop.
double-encode some utf-8 stuff for artistically interesting output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[msouth@foobry ~/work/utf8_test/utf8_thing ]$ perl test.pl
áéíóú
áéÃóú