Finding Those Pesky Unicode Characters in Visual Studio

Sometimes I’m handed HTML that I need to wire up and I find these unicodecharacters.  Usually there are only a couple on the page and, while annoying to find, it’s not a big deal.  Recently I found dozens and dozens of these guys on a page and wasn’t very happy at the prospect of having to manually search them all out and remove/replace them.  That is, until I did some research and found this very  helpful article by Aaron Jensen - Finding Non-ASCII Characters with Visual Studio.

Aaron’s wonderful solution:

Try searching your code with the following regular expression:

[^\x00-\x7f]

Open any of Visual Studio’s find windows and enter the regular expression above into the “Find what:” text box. Click the “Find Options” plus sign to expand the list of options. Check the last box “Use:” and choose “Regular expressions” from the drop down menu.

Easy and efficient.  Thanks, Aaron!

1 Comment

Comments have been disabled for this content.