![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^3: malformed UTF-8 character in JSON string in perlby aitap (Curate) |
on Aug 12, 2015 at 08:12 UTC ( #1138285=note: print w/replies, xml ) | Need Help?? |
binmode STDOUT, ":utf8";But is your terminal in UTF-8 mode? Try running perl yourscript.pl > utf8.txt and opening utf8.txt as UTF-8 text file. If you need to output Unicode characters to terminal, try Encode::Locale and binmode STDOUT, ":encoding(console_out)" (assuming that your terminal uses encoding which does have these Unicode characters; on Windows you may want to run chcp 65001 first).
In Section
Seekers of Perl Wisdom
|
|