in reply to Re: malformed UTF-8 character in JSON string in perl
in thread malformed UTF-8 character in JSON string in perl
I am not sure how you did you get the output "{ "cat" : "text abcd" }". Just now I tried with binmode but I've got the same error again(see below).
text ΤΗτ abcd
Would you please try this code and confirm again please.use strict; use warnings; use utf8; use JSON; my $data = "text abcd"; binmode STDOUT, ":utf8"; print "$data";
please remember the char mentioned in the statement ("text abcd")is not a regular dash.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: malformed UTF-8 character in JSON string in perl
by Laurent_R (Canon) on Aug 11, 2015 at 15:47 UTC | |
by Yllar (Novice) on Aug 11, 2015 at 16:00 UTC | |
Re^3: malformed UTF-8 character in JSON string in perl
by aitap (Curate) on Aug 12, 2015 at 08:12 UTC |