DEV Community

Cover image for Hidden Characters
Brian
Brian

Posted on

Hidden Characters

The other day a bug was reported to my team. On windows machines and android devices we were getting this character.

On android we would be getting just blank squares

When we would go and look in the code we couldn’t find anything.

We were able to cmd + shift + right arrow and it wouldn’t select anything but you could delete the character. Then my boss told me about the bare bones editor and how it has a setting you can turn on to see hidden characters.

Here is the setting to run on hidden characters

After then we were able to see this hidden | character.

If you selected them and did a search and can see what the editor interprets them to be. unicode 2028. https://www.compart.com/en/unicode/U+2028

I was able to then search our whole site to make sure that there wasn't any more of these hidden characters hanging around. We aren’t sure exactly how these characters got added but it could have been a copy and paste from microsoft word or outlook or an old design tool we used in the past.

Extras

I made a couple of designs one for a sticker click here to go get one.

And another for a T shirt if you would like to buy one click here.

Also if you are already using vscode I found a couple of plugins that are supposed to help find hidden characters.
https://marketplace.visualstudio.com/items?itemName=nachocab.highlight-dodgy-characters

https://marketplace.visualstudio.com/items?itemName=wengerk.highlight-bad-chars

Top comments (0)