is JSON data garbled under non-UTF-8 encoding? The authority of the next

Source: Internet
Author: User
is JSON data garbled under non-UTF-8 encoding? The authority of the next


Reply to discussion (solution)

It's not going to match your file code.

So the argument to Json_encode () must be utf-8 encoded, otherwise the null character or null will be obtained.

Handwriting is not, just a text, but the program generated is hard to say, encoding and decoding depends on the ability of the JSON control

This depends on the content of the data contained in your JSON data, if it contains a few language content, there will be garbled. Even with double quotes, the contents are garbled. I've come across it before.

You need to encode the parameters when passing them. I remember meeting the questions you said.

Garbled is just a subjective feeling
When you watch Utf-8 content in a GBK environment, watch GBK content in a utf-8 environment, and watch content in Chinese in a Western language environment, you see symbols that you're unfamiliar with, so you're saying that there are garbled characters. But in fact, that's what it's supposed to show in these environments, but you don't know it.

So, if you want to show some text to the public, use a context that fits the crowd. Instead of letting the public get used to you.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.