After the string is intercepted by substr, it is blank after ajax is passed to the foreground.

Source: Internet
Author: User
After the string is intercepted by substr, the string is truncated by substr after ajax is passed to the foreground. after ajax is passed to the foreground, the string is blank. only English-only characters can be displayed, and Japanese characters can be blank, which of the following is the reason.


Reply to discussion (solution)

Json return? Chinese must be UTF-8 encoded for json output

What if I don't intercept?

?? UTF8?

In what format? Is the code correct?

Please ensure that the file encoding format is UTF8 without BOM. the default php encoding is UTF-8, and the mysql encoding is also utf-8. garbled characters will stay away from you!

Paste the code first.

Try transcoding due to encoding problems.

Encoding problems: use UTF-8

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.