Searching for UTF8 files

Find, replace, find in files, replace in files, regular expressions

Searching for UTF8 files

Postby deoac » Tue Feb 14, 2006 9:39 am

How can I use Find in Files (or another utility) to search for all files encoded with UTF8?
User avatar
deoac
Newbie
 
Posts: 2
Joined: Tue Jan 24, 2006 12:00 am

Re: Searching for UTF8 files

Postby Mofi » Tue Feb 14, 2006 12:13 pm

All html files encoded with UTF-8 (should) have following line:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

Search for the bold highlighted part with Find In Files.

It's also possible to search for the BOM (byte order marker) EF BB BF which is displayed as . So you can search for this "string", too.

UTF-8 files without BOM and without charset specification are hard to detect has UTF-8 files and are also hard to find. I hope you do not have such UTF-8 files.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4056
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Find/Replace/Regular Expressions