Finding Those Pesky Unicode Characters in Visual Studio
Posted
by fallen888
on ASP.net Weblogs
See other posts from ASP.net Weblogs
or by fallen888
Published on Wed, 28 Mar 2012 14:23:00 GMT
Indexed on
2012/03/28
17:31 UTC
Read the original article
Hit count: 459
ASP.NET
|Visual Studio
Sometimes I’m handed HTML that I need to wire up and I find these characters. 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!
© ASP.net Weblogs or respective owner