How to modify socket.io Encoding

in the socket project, it is found that the cookie of the page obtained by socket.io is garbled, but the http request is normal.
after studying the request, it is found that the page encoding is different from that of the socket server, as shown in figure

find the answer in stackoverflow and decode it directly with utf8.
https://stackoverflow.com/que.

const utf8 = require("utf8");
utf8.decode(string);   //utf8

the previous idea was wrong, thinking that the encoding mode should be set in the socket.io server configuration to achieve page and server coding consistency.

Apr.23,2021

request a content-type header

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e987cc-474b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e987cc-474b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?