[WeChat applet] emoji expressions appear garbled when printed in the console

During the development requirements test today, I found that the emoji expressions are displayed normally on the applet side, but the traversal is garbled .

After trying it, I found that the console could not recognize the emoji because of the space after the expression.

Use regular matching item.match(/[^\s]/g)to remove spaces

The effect is as follows:

insert image description here

Guess you like

Origin blog.csdn.net/MinfCONS/article/details/122890777