Home>Article>Web Front-end> How to deal with jquery load Chinese garbled characters
The solution to jquery load Chinese garbled characters: first use editplus to create the [demo.txt] text; then save the text file [demo.txt] as [utf-8] format, and the Chinese will be displayed correctly.
The operating environment of this tutorial: windows7 system, jquery3.2.1 version, DELL G3 computer.
Solution to jquery load Chinese garbled characters:
Recommendation:jquery video tutorial
Use editplus to create demo.txt (saved by ANSI),
$("#div1").load("demo.txt");
//div displays Chinese garbled characters
defined in html59d54027d814bba7a6c118810bbc6025d,
Inconsistency in encoding and decoding causes garbled Chinese characters.
Save the text file demo.txt asutf-8
format. The Chinese text is displayed correctly. The problem is solved.
Related free Learning recommendation:js video tutorial
The above is the detailed content of How to deal with jquery load Chinese garbled characters. For more information, please follow other related articles on the PHP Chinese website!