in reply to Re^2: JSON and utf8 flag
in thread JSON and utf8 flag
Where?
Output:use Devel::Peek; use JSON::XS; my $smile = "☻"; my $j = JSON::XS->new->latin1(1)->encode(["$smile"]); my $d = JSON::XS->new->utf8(1)->latin1(1)->decode($j); Dump $$d[0];
SV = PV(0x8f19788) at 0x8f323bc REFCNT = 1 FLAGS = (POK,pPOK,UTF8) PV = 0x8f4be68 "\342\230\273"\0 [UTF8 "\x{263b}"] CUR = 3 LEN = 10
I put data without UTF8 flag to JSON and I want to get data without UTF8 flag from this JSON.
How to do it?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: JSON and utf8 flag
by choroba (Cardinal) on Sep 06, 2017 at 12:26 UTC | |
by Nick Kostirya (Sexton) on Sep 06, 2017 at 13:08 UTC | |
by Anonymous Monk on Sep 06, 2017 at 13:38 UTC | |
|
Re^4: JSON and utf8 flag
by ikegami (Patriarch) on Sep 07, 2017 at 18:04 UTC | |
by Nick Kostirya (Sexton) on Sep 08, 2017 at 09:01 UTC |