PHP json_encode json_decode UTF-8

前端 未结 10 837
温柔的废话
温柔的废话 2020-12-01 07:45

How can I save a json-encoded string with international characters to the databse and then parse the decoded string in the browser?



        
10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 08:26

    if you get "unexpected Character" error you should check if there is a BOM (Byte Order Marker saved into your utf-8 json. You can either remove the first character or save if without BOM.

提交回复
热议问题