Is json data garbled in non-UTF-8 encoding? Authority said that json data in non-UTF-8 encoding will be garbled? Authority
Reply to discussion (solution)
It won't be the same as the encoding of your file.
Therefore, the json_encode () parameter must be UTF-8 encoded. otherwise, null or null is obtained.
No, it's just a text, but it's hard to say it's generated by a program. encoding and decoding depend on the json control's capabilities.
This depends on the data content in your JSON data. if it contains content in a few languages, it will also contain garbled characters. Even the content with double quotation marks is garbled. I have met before.
Encoding is required when passing parameters. I remember what you said.
Garbled text is only subjective.
When you watch the UTF-8 Content in the gbk environment, the gbk content in the UTF-8 environment, and the Chinese content in the Spanish environment, you can see some unfamiliar symbols, so you can see garbled characters. But in fact, the content should be displayed in these environments, but you don't know it.
Therefore, if you want to show some texts to the public, you need to use the context that suits the public. Instead of letting the public adapt to you