json_encode()
wont work for me when I\'m using åäö. Why? And how can I get it to work?
The php
:
echo json_encode($arr);
Old question, but figured I'd put this here in case someone needs to log data using json_encode but keep the data untouched, intact for inspection later.
You can encode the data raw using base64_encode
, then it will work with json_encode
. Later after running json_decode
, you can decode the string with base64_decode
, you'll get the original data unmodified.