#Find BOM Byte Order Mark in files (DO NOT WANT THIS)
dir="$1";
if [ "X$dir" == "X" ]
then
	  echo match
		dir=".";
fi
echo "Find BOM IN Files in directory: $dir";
find $dir   -type f |
while read file
do
	#echo $file;
	if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ]
	then
		echo "found BOM in: $file"
	fi
done
## VIM
#
#
#FROM: http://vim.1045645.n5.nabble.com/How-to-display-and-remove-BOM-in-utf-8-encoded-file-td4681708.html
#Do ':set nobomb' before saving to remove a BOM. 
#to show in vim: e ++enc=latin1
#TO SHOW set fileencodings=ucs-bom,utf-8,latin1
#FROM: http://stackoverflow.com/questions/12219875/how-to-get-vim-to-show-a-byte-by-byte-representation-of-file-data
#TO SHOW BOM WORKS: set fileencodings=latin1
#to Check for Bom: setlocal nobomb?
#to remove bomb setlocal nobomb then w
#To save the file without a BOM: 
#		:setlocal nobomb 
#		:w 
#To ask Vim if there is a BOM: 
#		:setlocal bomb? 
