.html() method returns html with UNICODE when Chinese words are passed
See original GitHub issuevar cheerio = require('cheerio');
var $ = cheerio.load('<title>文章抓取</title>');
console.log($('title').html());
<=0.15.0 output:
文章抓取
0.16.0-0.17.0 output:
文章抓取
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Display Chinese Text on Web Page - html - Stack Overflow
Sometimes the actual file encoding is wrong. Try opening the output file in say "Notepad++" and see what encoding it detects in bottom...
Read more >htmlspecialchars - Manual - PHP
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings. This function...
Read more >PHP htmlspecialchars() Function - W3Schools
The htmlspecialchars() function converts some predefined characters to HTML entities. The predefined characters are: ... Tip: To convert special HTML entities ...
Read more >Structural markup and right-to-left text in HTML - W3C
This article looks at ways of handling text direction for structural markup in HTML, ie. at the document level and for elements like ......
Read more >UTF-8: The Secret of Character Encoding - HTML Purifier
PHP header() function; PHP ini directive; Non-PHP .htaccess; File extensions. XML; Inside the process. Why UTF-8? Internationalization; User-friendly; Forms.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try passing
decodeEntities: false
.@fb55 thanks