Created
September 8, 2012 23:28
-
-
Save kimmel/3681026 to your computer and use it in GitHub Desktop.
decode_json() takes a binary encoded string
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
#!/usr/bin/perl | |
use v5.14; | |
use warnings; | |
use utf8::all; | |
use Encode; | |
use Data::Dumper; | |
use JSON::XS qw( decode_json ); | |
my $wl = '{"creche":"crèche", "¥":"£", "₡":"волн"}'; | |
my $pattern_list = decode_json( encode("utf8", $wl) ); | |
print Dumper $pattern_list; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment