Problem with decoding UTF-8 JSON in perl
UTF-8 characters are destroyed when processed with the JSON library (maybe this is similar to Problem with decoding unicode JSON in perl, however setting binmode only creates another problem).
I have reduced the problem down to the following example:
When running testing the text is for some reason crippeled into iso-8859-1. Setting binmode sort of solves it but then causes double encoding of other strings.
What is causing this and how to solve?
This is on a newly installed and up to date Fedora 15 system.
As noted by perlunifaq
You saved your program in UTF-8, but forget to tell Perl. Add
Also, you are programming much too complicated. The JSON functions DWYM. To inspect stuff, use Devel::Peek.