Json_encode Charset problem

前端 未结 7 814
心在旅途
心在旅途 2020-12-10 17:35

When I use json_encode to encode my multi lingual strings , It also changes special characters.What should I do to keep them same .

For example

<         


        
相关标签:
7条回答
  • 2020-12-10 18:08
    • You shouldn't want this
    • It's definitely possible, even without PHP 5.4.

    First, use json_encode() to encode the string and save it in a variable.

    Then simply use preg_replace() to replace all \uxxxx with unicode again.

    0 讨论(0)
提交回复
热议问题