in reply to Malformed UTF-8 character

The others are right to point out should be using from_json, but that won't solve the error you're asking about.

The error you are asking about comes from Perl, not JSON. By using use utf8;, you claimed your source code is encoded using UTF-8, but it's not. Remove the use utf8; or convert the source code to UTF-8.

  • Comment on Re: Malformed UTF-8 character (unexpected continuation byte 0x96, with no preceding start byte)
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: Malformed UTF-8 character (unexpected continuation byte 0x96, with no preceding start byte)
by Yllar (Novice) on Aug 10, 2015 at 09:06 UTC

    Thanks for your Inputs. I tried all the possible solutions.Unfortunately, I have not got the permanent fix for this issue. The issue is not stick to hyphen(-), my source code throwing error with all non ASCII characters when decoding input data which contains ASCII characters.

      Show the output of cat script.pl ; od -c script.pl, and explain what you mean by "doesn't work".