As shown in the figure, this is an array, and I get the first item of the array, which is supposed to be 8, but it is printed to show that 9. is just starting to think it is a space, the length of trim is 9. and I go through the string. The first item is nothing, but he is not a blank or anything.Comparison is not equal). CharCodeAt (0) shows that 8203. is a zero width space. How does this come from? How do you get rid of it?
It’s probably because of the transcoding problem
Refer to http://blog.csdn.net/hexin373…
I hope to help you
This is best done from the source of data, but you can use regular matching to remove 8203 encoded characters.