in reply to Re^3: Convert \u characters into utf8
in thread Convert \u characters into utf8

Ahhh beautiful! I didn't realise they did the job for you. So I have this now:

my $as_str; open (READIT,"./in.txt"); $as_str = <READIT>; close(READIT); my $json_var = decode_json($as_str); open (OUT, ">./foo.txt") || die $!; print OUT encode_json($json_var); close (OUT);


That seems to have done the trick :)

Just out of interest - in NotePad++, if I look at the encoding, I see it as:

Encode in UTF-8 without BOM

I'm a bit confused as to how it has saved it like that, when I didn't specifically tell it to save in UTF8 format?

Cheers

Andy